function returnHeight() {
  var myWidth = 0, myHeight = 0;
  if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
	//alert('NON IE');
    myWidth = window.innerWidth;
    myHeight = window.innerHeight;
  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    //IE 6+ in 'standards compliant mode'
	//alert('IE 6+ compatible');
    myWidth = document.documentElement.clientWidth;
    myHeight = document.documentElement.clientHeight;
  } else if( document.body && ( document.body.clientWidth && document.body.clientHeight ) ) {
    //IE 4 compatible
    //alert('IE 4 compatible');
	myWidth = document.body.clientWidth;
    myHeight = document.body.clientHeight;
  }
  //alert("isGecko:"+browser.isGecko+" | isNS:"+browser.isNS+" | isIE:"+browser.isIE+" | isOpera:"+browser.isOpera+" | isMozilla:"+browser.isMozilla);
  
 // if (browser.isIE){
 // 	alert('H:'+document.body.offsetHeight);
 // }
  return myHeight;
}
var myH=returnHeight();





function openUrlInIfr(url){
	document.getElementById('actionIframe').src=url;
}



function popup(ww,hh,src){
	var width = ww;
	var height = hh;
	var ranL= Math.round(Math.random()*100);
	var ranT= Math.round(Math.random()*100);
	var l = ( screen.width - width )/2;
	var t = ( screen.height - height )/2 - 20;
	url = src;
	window.open( url, "_blank", "directories=0,location=0,menubar=no,titlebar=no,toolbar=0,scrollbars=0,resizable=0,left="+l+",top="+t+",width="+width+",height="+height );
}

function confirmSubmit(MSgs)
{
var agree=confirm(MSgs);
if (agree)
	return true ;
else
	return false ;
}


//function upG(id){
	//pop_menu
	/*
	var width = 620;
	var height = 530;
	var ranL= Math.round(Math.random()*100);
	var ranT= Math.round(Math.random()*100);
	var l = ( screen.width - width )/2;
	var t = ( screen.height - height )/2 - 20;
	url = "/up/?id="+id;
	window.open( url, "_blank", "directories=0,location=0,menubar=no,titlebar=no,toolbar=0,scrollbars=0,resizable=0,left="+l+",top="+t+",width="+width+",height="+height );
	*/
//}

function showgirl(id){
	var width = 800;
	var height = 660;
	var ranL= Math.round(Math.random()*100);
	var ranT= Math.round(Math.random()*100);
	var l = ( screen.width - width )/2;
	var t = ( screen.height - height )/2 - 20;
	url = "/girl/?from=local&id="+id;
	window.open( url, "_blank", "directories=0,location=1,menubar=no,titlebar=no,toolbar=0,scrollbars=yes,resizable=1,left="+l+",top="+t+",width="+width+",height="+height );
}


function changeAdditionalImage(newId){
	var curId;
	//var preV;
	//var nexT;
	//var preV = Number(preV);
	//var nexT = Number(nexT);
	curId = document.getElementById('curAdvSelImg').value;
	document.getElementById('foto_'+curId).style.display = "none";
	document.getElementById('foto_'+newId).style.display = "block";
	document.getElementById('tdPages_'+curId).className = "pages";
	document.getElementById('tdPages_'+newId).className = "active";
	document.getElementById('curAdvSelImg').value=newId;
	
	
	
	//preV = newId-1;
	//nexT = Number(newId)+1;
	//if (nexT > totaL) nexT = totaL;
	//if (preV <= 0) preV = 1;
	
	//alert("c:"+newId+"prev:"+preV+"next:"+nexT);
	//document.getElementById('prevFoto').href="javascript: changeAdditionalImage('"+preV+"', '"+totaL+"');";
	//document.getElementById('nextFoto').href="javascript: changeAdditionalImage('"+nexT+"', '"+totaL+"');";
}