function getLayer(name) {
return (document.all)?document.all[name]:document.getElementById(name);
}

function makePopUp(urlValue,widthValue,heightValue) {
    var leftPos = (screen.availWidth-900) / 2;
    var topPos = (screen.availHeight-600) / 2;
    NewWidthValue=widthValue+20;
    NewHeightValue=heightValue+20;
    return window.open(urlValue, 'PopUpWindow','width='+NewWidthValue+',height='+NewHeightValue+',menubar=0,scrollbars=no,resizable=no,statusbar=no,location=no,titlebar=0,toolbar=0,status=0,top=' + topPos + ',left=' + leftPos);

}

function makeScrollPopUp(urlValue,widthValue,heightValue) {
    var leftPos = (screen.availWidth-900) / 2;
    var topPos = (screen.availHeight-600) / 2;
    NewWidthValue=widthValue+20;
    NewHeightValue=heightValue+20;
    return window.open(urlValue, 'PopUpWindow','width='+NewWidthValue+',height='+NewHeightValue+',menubar=0,scrollbars=yes,resizable=no,statusbar=no,location=no,titlebar=0,toolbar=0,status=0,top=' + topPos + ',left=' + leftPos);

}

function preloadImages(){
	var d = document;  if(!d.pics) d.pics = [];
	for(var i = 0, a = preloadImages.arguments; i < a.length; i++)
		(d.pics[d.pics.length] = new Image()).src = a[i];
}

function GoURL(s){
  document.location = s;
}

function RePopUp(oLink) {
	if (oLink.target == 'PopUp') {
		if (oLink.href.match(/(jpg)|(png)|(gif)$/i)) {
			win = makePopUp(oLink.href,400,330);
			win.document.open("text/html");
			win.document.write('<html><head><title>'+txt_rePopUpTitle+'</title></head><script language="JavaScript" type="text/javascript">function GetLayer(name) {return ((eval(document.all))?(document.all[name]):(document.getElementById(name)))} function doR () { window.resizeTo(GetLayer(\'pimg\').width+13,GetLayer(\'pimg\').height+37)}</script><body onload="doR();" bgcolor="#ffffff" style="margin:0px;text-align:center;"><a href="#" onclick="window.close()"><img src="'+oLink.href+'" name="pimg" id="pimg" alt="" border="0"/></a></body></html>');
			win.document.close();
		} else {
			makePopUp(oLink.href,400,330);
		}	
		return false;
	}
	return true;
} 
function EnlargeCafe(url) {
nOb = new Object();
dot_flag = url.substring(0,2);
if(dot_flag == '..'){
	url = url.substring(2);
}
nOb = window.open(url,'EnlargeCafe','width=920,height=705,scrollbars=0')
nOb.focus();
}
function TellToFriend(url) {
nOb = new Object();
nOb = window.open(url,'TellaFriend','width=450,height=500,scrollbars=0')
nOb.focus();
}
