function go(id) {
	var deger=document.getElementById(id);
	return deger;
}
function div_goster(id)
{
 var div=go(id).style.display="";	
}
function div_gizle(id)
{
 var div=go(id).style.display="none";	
}
function div_switch(id)
{
 var div=go(id);
 div.style.display=div.style.display=='none'?'':'none';
}
function openwindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
function _openpu(form_id,divform_id,divname,jstype,field_id) {
	var jsname = 'empty';
	switch (jstype) {
		case 'standart':
			var features = 'status=yes,scrollbars=yes,resizable=yes,width=700,height=500';
			openwindow('http://www.aguagu.com/popup_pictureupload.php?field_id='+field_id,'aguagupuploader',features); 
			break;
		case 'gallery':	
			var features = 'status=yes,scrollbars=yes,resizable=yes,width=700,height=500';
			openwindow('http://www.aguagu.com/popup_pictureuploadgallery.php?galleries_id='+form_id,'aguagupuploader',features); 
			break;
	}    
}
function _refreshgpage(pg) {
	window.location.href = pg;	
}
function drawjsgallery(baby_id,form_id,field_id) {
		
	
}
function findPosX(obj) {
	var curleft = 0;
	if (obj.offsetParent) {
		while (obj.offsetParent) {
			curleft += obj.offsetLeft;
			obj = obj.offsetParent;
		}
	} else if (obj.x) {
		curleft += obj.x;
	}
	return curleft;
}
function findPosY(obj) {
	var curtop = 0;
	if (obj.offsetParent) {
		while (obj.offsetParent) {
			curtop += obj.offsetTop;
			obj = obj.offsetParent;
		}
	} else if (obj.y) {
		curleft += obj.y;
	}
	return curtop;
}
function xy_div(yazilacak_div,yeri_belirlenecek_div,x_fark,y_fark)
{
	//alert(yazilacak_div);
	//alert(yeri_belirlenecek_div);
	theObject = go(yazilacak_div);
	var posx = 0;
	var posy = 0;
	if(x_fark>=0)
	posx = (findPosX(go(yeri_belirlenecek_div)) + x_fark);
	else
	{
	x_fark=x_fark*-1;
	posx = (findPosX(go(yeri_belirlenecek_div)) - x_fark);
	}
	if(y_fark>=0)
	posy = (findPosY(go(yeri_belirlenecek_div)) + y_fark);
	else
	{
	y_fark=y_fark*-1;
	posy = (findPosY(go(yeri_belirlenecek_div)) - y_fark);
	}
	theObject.style.left = posx + "px";
	//alert(posx)
	theObject.style.top = posy + "px";
	//alert(posy)
	go(yazilacak_div).style.display="";
}
function isbirthday(today,birthday) {
	if (today.substr(4,4)==birthday.substr(4,4))
		document.write('<img src="cimages/pasta.gif">');
}