
var sPop = null;
var postSubmited = false;

document.write("<style type='text/css'id='defaultPopStyle'>");
document.write(".cPopText { font-family: Tahoma,Verdana; background-color: #FFFFCC; border: 1px #000000 solid; font-size: 11px; padding-right: 4px; padding-left: 4px; height: 16px; padding-top: 2px; padding-bottom: 2px; visibility: hidden;}");

document.write("</style>");
document.write("<div id='popLayer' style='position:absolute;z-index:1000' class='cPopText'></div>");


function showPopupText() {
	var o=event.srcElement;
	MouseX=event.x;
	MouseY=event.y;
	if(o.alt!=null && o.alt!="") { o.pop=o.alt;o.alt="" }
        if(o.title!=null && o.title!=""){ o.pop=o.title;o.title="" }
	if(o.pop!=sPop) {
		sPop=o.pop;
		if(sPop==null || sPop=="") {
			popLayer.style.visibility="hidden";	
		} else {
			if(o.dyclass!=null) popStyle=o.dyclass 
			else popStyle="cPopText";
			popLayer.style.visibility="visible";
			showIt();
		}
	}
}

function showIt() {
	popLayer.className=popStyle;
	popLayer.innerHTML=sPop.replace(/<(.*)>/g,"&lt;$1&gt;").replace(/\n/g,"<br>");;
	popWidth=popLayer.clientWidth;
	popHeight=popLayer.clientHeight;
	if(MouseX+12+popWidth>document.body.clientWidth) popLeftAdjust=-popWidth-24
		else popLeftAdjust=0;
	if(MouseY+12+popHeight>document.body.clientHeight) popTopAdjust=-popHeight-24
		else popTopAdjust=0;
	popLayer.style.left=MouseX+12+document.body.scrollLeft+popLeftAdjust;
	popLayer.style.top=MouseY+12+document.body.scrollTop+popTopAdjust;
}

document.onmouseover=showPopupText;


//////////////////////////////////////////////////////////////////////////////////////
function popUpWin(pop_up_url,pop_up_name,pop_up_features){
	window.open(pop_up_url,pop_up_name,pop_up_features);
}

function selectJump(targ,sel_Obj,restore){
	eval(targ+".location='"+sel_Obj.options[sel_Obj.selectedIndex].value+"'");
	if (restore) sel_Obj.selectedIndex=0;
}

function popUpBooking(hotel_district,hotel_region,hotel_name,form_name,language){
	if(hotel_name!=""){
		booking_url ="https://www.hotelsbookingcenter.com/ssl/reservation.php?region="+hotel_district+"&hotelname="+hotel_name+"&ct=United+Kingdom&title=Hotel-Reservation-Form&dn=discount-london-hotels.biz&language="+language+"&color=008FD5";
	}
	else{
		booking_url ="https://www.hotelsbookingcenter.com/ssl/reservation.php?dn=discount-london-hotels.biz";
	}
	window.open(booking_url,'BookingForm','width=780,height=500,scrollbars=yes,status=yes,resizable=yes');
}

function goTo(goToUrl){
	window.location.href = goToUrl;
}




function popUpEnquiry(hotel_district,hotel_region,hotel_name,form_name,language){
	if(hotel_name!=""){
		booking_url ="http://www.hotelsbookingcenter.com/enquiry.php?region="+hotel_district+"&hotelname="+hotel_name+"&ct=United+King&title=Hotel-PreBook-Enquiry-Form&dn=discount-london-hotels-hotels.biz&language="+language+"&color=669900";
	}
	else{
		booking_url ="http://www.hotelsbookingcenter.com/enquiry.php?dn=discount-london-hotels-hotels.biz";
	}
	window.open(booking_url,'PreBookEnquiryForm','width=780,height=500,scrollbars=yes,status=yes,resizable=yes');
}