//if (window.parent!=window)
//{
	//window.open(location.href, '_top', '');
//}

//window.status = 'GetHotelNow.com - GetHotelNow.com! Reservation discounted hotels in all major destinations at lowest rates';
var prjName="";
function PopupPhoto(sPicURL) { 
  window.open( prjName+"photoview.htm?"+sPicURL, "", "resizable=1,top=250,left=350,height=100,width=100");
} 
	 
function PopUpMap(Url,Name) { //v3.0
	var wh=450;
	var ww=450;
	var t='Top='+Math.floor((screen.height-wh)/2);
	var l='Left='+Math.floor((screen.width-ww)/2);
	var param='Height='+wh+',Width='+ww+','+t+','+l;
	window.open(Url,Name,param);
	return;
}

function BookNow(url, inNew, winDef,h,w)
{
	bsh = 96;
	rsw = 10;
	h = screen.height - bsh;
	w = screen.width - rsw;
	if (w > 790) {
		w = 796;
	}
	if (url == '')
		return;

	if (typeof(inNew)=='undefined!')
		inNew = 0;

	if (winDef=='default')
		winDef = 'Height='+h+',Width='+w+',Top='.concat((screen.height - h)/2).concat(',Left=').concat((screen.width - w)/2); //.concat(',scrollbars,resizable');
		
	if (winDef=='resizable')
		winDef = 'Height='+h+',Width='+w+',Top='.concat((screen.height - h)/2).concat(',Left=').concat((screen.width - w)/2).concat(',resizable');

	if (winDef=='havescroll')
	{
		winDef = 'Height='+h+',Width='+w+',Top='.concat(((screen.height - h)/2) - (bsh/2)).concat(',Left=').concat(((screen.width - w)/2) - (rsw/2)).concat(',scrollbars,resizable,status');
		//winDef = 'Height='+h+',Width='+w+',Top=0,Left=0,scrollbars,resizable,status';
		//alert(winDef);
	}

	if (inNew)
	{
		newWindow = window.open(url, inNew, winDef);
		newWindow.focus();
	}
	else
	{
		location.href = url;
	}
}

function openMe(url, inNew, h, w)
{
	if (url == '')
		return;

	if (typeof(inNew)=='undefined!')
		inNew = 0;

	winDef = 'Height='.concat(h).concat(',Width=').concat(w).concat(',Top=').concat(((screen.height - h)/2)-20).concat(',Left=').concat((screen.width - w)/2).concat(',scrollbars');
	
	//.concat(',scrollbars,resizable');

	if (inNew)
	{
		newWindow = window.open(url, inNew, winDef);
		newWindow.focus();
	}
	else
	{
		location.href = url;
	}
}

function openMe2(url, inNew, winDef,h,w)
{
	if (url == '')
		return;

	if (typeof(inNew)=='undefined!')
		inNew = 0;

	if (winDef=='default')
		winDef = 'Height='+h+',Width='+w+',Top='.concat((screen.height - h)/2).concat(',Left=').concat((screen.width - w)/2); //.concat(',scrollbars,resizable');
		
	if (winDef=='resizable')
		winDef = 'Height='+h+',Width='+w+',Top='.concat((screen.height - h)/2).concat(',Left=').concat((screen.width - w)/2).concat(',resizable');

	if (winDef=='havescroll')
		winDef = 'Height='+h+',Width='+w+',Top='.concat((screen.height - h)/2).concat(',Left=').concat((screen.width - w)/2).concat(',scrollbars,resizable,status');

	if (inNew)
	{
		newWindow = window.open(url, inNew, winDef);
		newWindow.focus();
	}
	else
	{
		location.href = url;
	}
}

function openMe3(url, inNew, winDef,h,w)
{
	if (url == '')
		return;

	if (typeof(inNew)=='undefined!')
		inNew = 0;

	if (winDef=='default')
		winDef = 'Height='+h+',Width='+w+',Top='.concat((screen.height - h)/2).concat(',Left=').concat((screen.width - w)/2); //.concat(',scrollbars,resizable');

	if (winDef=='havescroll')
		winDef = 'Height='+h+',Width='+w+',Top='.concat((screen.height - h)/2).concat(',Left=').concat((screen.width - w)/2).concat(',scrollbars,resizable');

	if (inNew)
	{
		newWindow = window.open(url, inNew, winDef);
		newWindow.focus();
	}
	else
	{
		location.href = url;
	}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.0
  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 && document.getElementById) x=document.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

// Start menu box hover functions
function mOvr(src,clrOver){ 
	if (!src.contains(event.fromElement)){ 
		src.style.cursor = 'hand'; 
		src.bgColor = clrOver; 
	} 
} 
function mOut(src,clrIn){ 
	if (!src.contains(event.toElement)){ 
		src.style.cursor = 'default'; 
		src.bgColor = clrIn; 
	} 
} 
function mClk(src){ 
	if(event.srcElement.tagName=='TD')
		src.children.tags('A')[0].click();
}
// End menu box hover functions

// Start Adobe ImageReady codes

function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}

function changeImages() {
	if (document.images && (preloadFlag == true)) {
		for (var i=0; i<changeImages.arguments.length; i+=2) {
			document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
		}
	}
}

var preloadFlag = false;
function preloadImages() {
	if (document.images) {
		scrollbackground_up_arrow_over = newImage("cv/images/common/scroll-background_up_arrow-.gif");
		scrollbackground_up_arrow_down = newImage("cv/images/common/scroll-background_up_arr-07.gif");
		scrollbackground_down_arrow_over = newImage("cv/images/common/scroll-background_down_a-14.gif");
		scrollbackground_down_arrow_down = newImage("cv/images/common/scroll-background_down_a-15.gif");
		preloadFlag = true;
	}
}

// End Adobe ImageReady codes

// Start booking from advanced options

function blockdisplay(i) {
	if (document.getElementById){
		if (document.getElementById("blockdisplay"+i)) {
			for ( j = 1; j < 1000; j++ ) {
				if (document.getElementById('blockdisplay' + j)) {document.getElementById('blockdisplay' + j).style.display = 'none';}
			else {j = 1000;}
			}
			if (i) {document.getElementById("blockdisplay"+i).style.display = 'block';}
		}
	}
}

function showDiv (el, div, alignX, alignY) {
	if (document.getElementById){
			var i = document.getElementById(el);
		var c = document.getElementById(div);
				if (c.style.display != "block"){
			var l=0; var t=0;
						aTag = i;
						do {
								aTag = aTag.offsetParent;
								l += aTag.offsetLeft;
								t += aTag.offsetTop;
						} while (aTag.offsetParent && aTag.tagName != 'BODY');
					var left = i.offsetLeft + 202; //OK
    	    var top = i.offsetTop + t + i.offsetHeight + 8; //OK
					//var left = l + 1;
    	    //var top = t + 2;
			if (alignX == 'left' && c.style.width){
				left = left - parseInt(c.style.width);
			}
			if (alignY == 'top' && c.style.height){
				top = top - parseInt(c.style.height) -25; //OK
			}
					c.style.left = left+'px';
					c.style.top = top+'px';
			c.style.display = "block";
		} else {
			c.style.display="none";
		}
	}
}

function showDiv2 (el, div, alignX, alignY) {
	if (document.getElementById){
			var i = document.getElementById(el);
		var c = document.getElementById(div);
				if (c.style.display != "block"){
			var l=0; var t=0;
						aTag = i;
						do {
								aTag = aTag.offsetParent;
								l += aTag.offsetLeft;
								t += aTag.offsetTop;
						} while (aTag.offsetParent && aTag.tagName != 'BODY');
					var left = i.offsetLeft + 202; //OK
    	    var top = i.offsetTop + t + i.offsetHeight + 8; //OK
					//var left = l + 1;
    	    //var top = t + 2;
			if (alignX == 'left' && c.style.width){
				left = left - parseInt(c.style.width);
			}
			if (alignY == 'top' && c.style.height){
				top = top - parseInt(c.style.height) -25; //OK
			}
					left = left - 160;
					c.style.left = left+'px';
					c.style.top = top+'px';
			c.style.display = "block";
		} else {
			c.style.display="none";
		}
	}
}

function hideDiv (div) {
	if (document.getElementById){
		var c=document.getElementById(div);
		c.style.display="none";
	}
}

// End booking from advanced options
function PrintMe() {
	if(window.print) window.print()
    else alert (tr.pressCltP);
}

function Bookmark() {
	if(window.external) window.external.AddFavorite("http://www.gethotelnow.com","GetHotelNow.com - Online Hotel Booking");
	else alert (tr.pressCtlD);
}
