function pimpimpim(url,iw,ih) { 
  //document.getElementById("img01").style.background = "url(get.php?i."+url+":w.252:h.188) no-repeat center";
 // document.getElementById("hrefshow").href = "javascript: void(0); 
 popOriginal(url,iw,ih); 
}	

function popOriginal(i,w,h) {
	var x, y = 0;
	if (screen) {
	x = (screen.availWidth - w) / 2;
	y = (screen.availHeight - h) / 2;
	}
	win = window.open("get.php?i."+i,'pop','width='+w+',height='+h+',top='+y+',left='+x+'scrolling=0,toolbar=0,status=0');
	var body = "<html><head><title>Langas</title></head><meta http-equiv=\"imagetoolbar\" content=\"no\"><body topmargin=0 leftmargin=0 marginwidth=0 marginheight=0>";
	body += "<img style=\"\" onclick=\"window.close();\" alt=\"\" src=\"get.php?i."+i+"\" alt=\"\"/>";
	body += "</body></html>";
	win.document.write(body);
	win.document.close();
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  //alert(window.event.offsetX);
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v;	}
    obj.visibility=v;
	obj.left = window.event.clientX;
	obj.top = window.event.clientY;
  }
}

function gotoURL(oID)
{
	location.href = document.getElementById(oID).href;
}

function OpenAikstele()
{
	title = "Aikštelė";
	url = "http://www.biciuliu.lt/client/img/aikstele.jpg";
	width = 1100;
	height = 600;
	window_name = "sp_aikstele";
	
	win = openCenteredWindow("", window_name, parseInt(width), parseInt(height), 0, 0, "");

	var body = "<html><head><title>"+title+"</title></head><meta http-equiv=\"imagetoolbar\" content=\"no\"><body topmargin=0 leftmargin=0 marginwidth=0 marginheight=0>";
	body += "<img style=\"\" onclick=\"window.close();\" alt=\"\" src=\""+url+"\">";
	body += "</body></html>";
	
	win.document.write(body);
	win.document.close();
}

function toggle_custom_menu(div_id){
	var big = document.getElementById(div_id + 'big')
	var small = document.getElementById(div_id + 'small')
	if(big){
		if(big.style.display=='none')
			big.style.display='block'
		else
			big.style.display='none'
	}
	if(small){
		if(small.style.display=='none')
			small.style.display='block'
		else
			small.style.display='none'
	}
	return false
}

