




/*
     FILE ARCHIVED ON 23:03:05 Aug 10, 2003 AND RETRIEVED FROM THE
     INTERNET ARCHIVE ON 12:54:48 Jul 27, 2011.
     JAVASCRIPT APPENDED BY WAYBACK MACHINE, COPYRIGHT INTERNET ARCHIVE.

     ALL OTHER CONTENT MAY ALSO BE PROTECTED BY COPYRIGHT (17 U.S.C.
     SECTION 108(a)(3)).
*/
function openSmallWindow(url,vtop,vleft,vwidth,vheight)
{
        if(vtop==null)
        if(vleft==null)
        if(vwidth==null) {vwidth=550; }
        if(vheight==null) {vheight=300; }
        var win_param;
        win_param="top="+vtop+",left="+vleft+",width="+vwidth+",height="+vheight+"channelmode=0,dependent=0,directories=0,fullscreen=0,location=0,menubar=0,resizable=1,scrollbars=1,status=0,toolbar=0,screenX=0,left=10,screenY=0";
        msgWindow=open(url,"smallWindow",win_param);
        msgWindow.focus();
        msgWindow.opener= self;
        return false;
}

function OpenCertDetails()
{
	window.open('https://www.thawte.com/cgi/server/certdetails.exe?code=THMUST4-1', 'anew', config='height=400,width=450,toolbar=no,menubar=no,scrollbars=yes,resizable=no,location=no,directories=no,status=yes');
}
function MM_openBrWindow(theURL,winName,features)
{
	window.open(theURL,winName,features);
}
function PrivacyPolicy()
{
	thewindow = window.open('/privacy_policy.html?site=$site', 'Privacy', config='height=490,width=570,toolbar=no,menubar=no,scrollbars=yes,resizable=no,location=no,directories=no,status=yes');
}

function OpenAboutUs()
{
	thewindow = window.open('http://web.archive.org/web/20030810230305/http://www.asiarooms.com/about_us.html?site=$site', 'About', config='height=490,width=680,toolbar=no,menubar=no,scrollbars=yes,resizable=no,location=no,directories=no,status=yes');
}
function wap(id) {
	window.open('/wireless/show_hotel.php?id='+id,'AsiaroomsWAP','width=300,height=530,scrollbars=1')
}
function OpenFlights()
{
	thewindow = window.open('http://web.archive.org/web/20030810230305/http://www.pacificrooms.com/flights.html?site=asiarooms.com', 'Flights', config='height=490,width=680,toolbar=no,menubar=no,scrollbars=yes,resizable=no,location=no,directories=no,status=yes');
}

function openfax(mysite)
{
	var myurl = '/faxform.html?site=' + mysite;
	var nwin = window.open (myurl,  'FAXFORM', 'channelmode=0,dependent=0,directories=0,fullscreen=0,location=0,menubar=0,resizable=1,scrollbars=1,status=0,toolbar=1,screenX=0,left=150,screenY=0,top=0,height=450,width=550');
	nwin.focus();
}
function recruit()
{
	var nwin = window.open ('/recruite.html',  'RECRUIT', 'channelmode=0,dependent=0,directories=0,fullscreen=0,location=0,menubar=0,resizable=0,scrollbars=0,status=0,toolbar=0,screenX=0,left=50,screenY=0,top=0,height=550,width=420');
	nwin.focus();
}
function formHandler(form)
{
	var URL = document.form.site.options[document.form.site.selectedIndex].value;
	window.location.href = URL;
}

function walker(mysite)
{
	var myurl = 'http://web.archive.org/web/20030810230305/http://asiarooms.com/templates/call.html?site=' + mysite;
	var nwin = window.open (myurl,  'WALKER', 'channelmode=0,dependent=0,directories=0,fullscreen=0,location=0,menubar=0,resizable=0,scrollbars=0,status=0,toolbar=0,screenX=0,left=10,screenY=0,top=10,height=530,width=550');
	nwin.focus();
}

function reviews(myid)
{
	var myurl = '/review.html?&id=' + myid;
	var nwin = window.open (myurl,  'REVIEW', 'channelmode=0,dependent=0,directories=0,fullscreen=0,location=0,menubar=0,resizable=0,scrollbars=0,status=0,toolbar=0,screenX=0,left=10,screenY=0,top=10,height=380,width=550');
	nwin.focus();
}

var currentform;
function findrates(id)
{
	chkin_d = window.document.chkin.day.selectedIndex+1;
	chkin_m = window.document.chkin.month.selectedIndex+1;
	chkin_y = window.document.chkin.year.selectedIndex+2003;
	chkout_d = window.document.chkout.day.selectedIndex+1;
	chkout_m = window.document.chkout.month.selectedIndex+1;
	chkout_y = window.document.chkout.year.selectedIndex+2003;

	if (chkin_d<10)
		chkin_d = '0' + chkin_d;
	if (chkin_m<10)
		chkin_m = '0' + chkin_m;
	if (chkout_d<10)
		chkout_d = '0' + chkout_d;
	if (chkout_m<10)
		chkout_m = '0' + chkout_m;

	chkindate = chkin_y.toString()+chkin_m.toString()+chkin_d.toString();
	chkoutdate = chkout_y.toString()+chkout_m.toString()+chkout_d.toString();
	
	if (chkindate > chkoutdate)
		alert('Please select your Check-OUT date AFTER your Check-IN date.');
	else
		window.location.href='/findrates.php?id='+id+'&chkindate='+chkindate+'&chkoutdate='+chkoutdate;
}

function chge_month(f)
{
	if (f.year.selectedIndex==0 && f.month.selectedIndex+1 < 2)
		f.year.selectedIndex++;
}

function chge_month2(f,id)
{
	if (f.year.selectedIndex==0 && f.month.selectedIndex+1 < 2)
		f.year.selectedIndex++;
	findrates(id);
}

function chge_year(f)
{
	if (f.year.selectedIndex==0 && f.month.selectedIndex+1< 2)
		f.month.selectedIndex=2-1;
}

function calendar(f)
{
	currentform=f;
	m=f.month.selectedIndex+1;
	y=f.year.selectedIndex+2003;
	nw=window.open('/hotels/hotel_php3/calendar.php?m='+m+'&y='+y, 'Choose_a_Date', config='height=300,width=300,toolbar=no,menubar=no,scrollbars=no,resizable=no,location=no,directories=no,status=no');
	nw.focus();
	return false;
}

function pictures(myid)
{
	var myurl = '/pictures.php?&id=' + myid;
	var nwin = window.open (myurl,  'PICTURE', 'channelmode=0,dependent=0,directories=0,fullscreen=0,location=0,menubar=0,resizable=1,scrollbars=1,status=0,toolbar=0,screenX=0,left=10,screenY=0,top=0,height=600,width=800');
	nwin.focus();
}

function checkreview(f)
{
	var error = '';
	if((f.mail.value.indexOf("@")>=0)&&(f.mail.value.indexOf(".")>=0))
	{}
	else
		error = 'Email address\n';
	if(f.user.value=='')
		error = error + 'name\n';
	if(f.user_country.value=='')
		error = error + 'country\n';
	if(f.message.value=='')
		error = error + 'comments\n';
	if(error != '')
	{
		alert('Error on your form, please check your :\n' + error);
		return false;
	}
	else
	{
		f.submit();
	}
}

function morereviews(myid)
{
	var myurl = '/see_reviews.php?&id=' + myid;
	var nwin = window.open (myurl,  'MOREREVIEW', 'channelmode=0,dependent=0,directories=0,fullscreen=0,location=0,menubar=0,resizable=0,scrollbars=1,status=0,toolbar=0,screenX=0,left=10,screenY=0,top=10,height=380,width=450');
	nwin.focus();
}

function reffriend(id, link)
{
	var myurl = '/refer-a-friend.php?id=' + id + '&link=' + link;
	var nwin = window.open (myurl,  'MOREREVIEW', 'channelmode=0,dependent=0,directories=0,fullscreen=0,location=0,menubar=0,resizable=0,scrollbars=1,status=0,toolbar=0,screenX=0,left=10,screenY=0,top=10,height=380,width=450');
	nwin.focus();
}

function checkrefer(f)
{
	var error = '';
	if((f.fromemail.value.indexOf("@")>=0)&&(f.fromemail.value.indexOf(".")>=0))
	{}
	else
		error = 'Your e-mail address\n';
	if((f.toemail.value.indexOf("@")>=0)&&(f.toemail.value.indexOf(".")>=0))
	{}
	else
		error = error + 'Your Friends e-mail address\n';
	if(f.fromname.value=='')
		error = error + ' Your name\n';
	if(f.toname.value=='')
		error = error + ' Your Friends name\n';
	if(f.message.value=='')
		error = error + 'Your message\n';
	if(error != '')
	{
		alert('Error on your form, please check your :\n' + error);
		return false;
	}
	else
	{
		f.submission.disabled = true;
		f.submit();
	}
}
function brokenlink()
{
	var myurl = '/broken-link.php';
	var nwin = window.open (myurl,  'BROKENLINK', 'channelmode=0,dependent=0,directories=0,fullscreen=0,location=0,menubar=0,resizable=0,scrollbars=1,status=0,toolbar=0,screenX=0,left=10,screenY=0,top=10,height=380,width=450');
	nwin.focus();
}

function checkbroken(f)
{
	var error = '';
	if((f.usremail.value.indexOf("@")>=0)&&(f.usremail.value.indexOf(".")>=0))
	{}
	else
		error = 'Your e-mail address\n';
	if(f.badurl.value=='')
		error = error + ' The Url\n';
	if(f.details.value=='')
		error = error + ' Your message\n';
	if(error != '')
	{
		alert('Error on your form, please check your :\n' + error);
		return false;
	}
	else
	{
		f.submission.disabled = true;
		f.submit();
	}
}
function testi()
{
	var myurl = '/testimonial.php';
	var nwin = window.open (myurl,  'Testimonial', 'channelmode=0,dependent=0,directories=0,fullscreen=0,location=0,menubar=0,resizable=0,scrollbars=1,status=0,toolbar=0,screenX=0,left=10,screenY=0,top=10,height=380,width=450');
	nwin.focus();
}

function checktesti(f)
{
	var error = '';
	if((f.mail.value.indexOf("@")>=0)&&(f.mail.value.indexOf(".")>=0))
	{}
	else
		error = 'Email address\n';
	if(f.user.value=='')
		error = error + 'name\n';
	if(f.user_country.value=='')
		error = error + 'country\n';
	if(f.message.value=='')
		error = error + 'comments\n';
	if(error != '')
	{
		alert('Error on your form, please check your :\n' + error);
		return false;
	}
	else
	{
		f.submission.disabled = true;
		f.submit();
	}
}
