﻿var currentDate = new Date();

function MM_jumpMenu(targ, selObj, restore)
{//v3.0
	var targetPath = selObj.options[selObj.selectedIndex].value;
	switch (targetPath)
	{
		case "reservations_en" :
			openReservation('en','1','1',currentDate.getFullYear(),currentDate.getMonth()+1,currentDate.getDate(),currentDate.getFullYear(),currentDate.getMonth()+1,currentDate.getDate()+1);
			break;
		case "reservations_fr" :
			openReservation('fr','1','1',currentDate.getFullYear(),currentDate.getMonth()+1,currentDate.getDate(),currentDate.getFullYear(),currentDate.getMonth()+1,currentDate.getDate()+1);
			break;
		case "reservations_tr" :
			openReservation('tr','1','1',currentDate.getFullYear(),currentDate.getMonth()+1,currentDate.getDate(),currentDate.getFullYear(),currentDate.getMonth()+1,currentDate.getDate()+1);
			break;
		default :
			eval(targ+".location='"+targetPath+"'");
			if (restore)
			{
				selObj.selectedIndex = 0;
			}
			break;
	}
}

function openReservation(lang, roomType, roomCount, checkinYear, checkinMonth, checkinDate, checkoutYear, checkoutMonth, checkoutDate)
{
	var page = window.open('https://www.istanbulkenthotel.com/onlinereservation.aspx?language='+lang+'&roomType='+roomType+'&roomCount='+roomCount+'&checkinYear='+checkinYear+'&checkinMonth='+checkinMonth+'&checkinDate='+checkinDate+'&checkoutYear='+checkoutYear+'&checkoutMonth='+checkoutMonth+'&checkoutDate='+checkoutDate, 'reservation', 'width=500,height=650');
	page.focus();
}

function reservationForm(lang, roomType, roomCount, checkinYear, checkinMonth, checkinDate, checkoutYear, checkoutMonth, checkoutDate)
{
	document.write('<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"https://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0\" width=\"500\" height=\"650\" align=\"right\"><param name=\"movie\" value=\"https://www.istanbulkenthotel.com/flash/onlinereservation.swf?language='+lang+'&roomType='+roomType+'&roomCountp='+roomCount+'&checkinYear='+checkinYear+'&checkinMonth='+checkinMonth+'&checkinDate='+checkinDate+'&checkoutYear='+checkoutYear+'&checkoutMonth='+checkoutMonth+'&checkoutDate='+checkoutDate+'\"><param name=\"quality\" value=\"high\"><param name=\"SCALE\" value=\"noscale\"><embed src=\"https://www.istanbulkenthotel.com/flash/onlinereservation.swf?language='+lang+'&roomType='+roomType+'&roomCountp='+roomCount+'&checkinYear='+checkinYear+'&checkinMonth='+checkinMonth+'&checkinDate='+checkinDate+'&checkoutYear='+checkoutYear+'&checkoutMonth='+checkoutMonth+'&checkoutDate='+checkoutDate+'\" width=\"500\" height=\"650\" align=\"right\" quality=\"high\" pluginspage=\"https://www.macromedia.com/go/getflashplayer\" type=\"application/x-shockwave-flash\" scale=\"noscale\"></embed></object>');
}

function flashadmin()
{
	document.write('<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"https://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0\" width=\"990\" height=\"800\"><param name=\"movie\" value=\"https://www.istanbulkenthotel.com/flash/mainapp.swf\"><param name=\"allowScriptAccess\" value=\"sameDomain\"><param name=\"quality\" value=\"high\"><param name=\"SCALE\" value=\"noscale\"><embed src=\"https://www.istanbulkenthotel.com/flash/mainapp.swf\" allowScriptAccess=\"sameDomain\" width=\"990\" height=\"800\" quality=\"high\" pluginspage=\"https://www.macromedia.com/go/getflashplayer\" type=\"application/x-shockwave-flash\" scale=\"noscale\"></embed></object>');
}

/*function ipixArea(section)
{
	document.write('<div style=\"border:4px solid #F0EBD9;width:540px\"><applet name=\"IpixViewer\" code=\"IpixViewer.class\" archive=\"IpixViewer.jar\" width=\"540\" height=\"405\"><param name=\"url\" value=\"ipix/'+section+'.ipx\"><param name=\"toolbar\" value=\"on\"><param name=\"transparent\" value=\"yes\"><param name=\"splash\" value=\"ipixvirtualtour.jpg\"><param name=\"splashbg\" value=\"FFFFFF\"><param name=\"spinspeed\" value=\"6\"><param name=\"spinstyle\" value=\"flat\"><param name=\"wmode\" value=\"transparent\"></applet></div>');
}*/

function rates(lang)
{
	document.write('<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"https://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0\" width=\"289\" height=\"395\"><param name=\"movie\" value=\"flash/reservation_small.swf?language='+lang+'\"><param name=\"quality\" value=\"high\"><param name=\"wmode\" value=\"transparent\"><param name=\"SCALE\" value=\"noscale\"><embed src=\"flash/reservation_small.swf?language='+lang+'\" width=\"289\" height=\"395\" wmode=\"transparent\" quality=\"high\" pluginspage=\"https://www.macromedia.com/go/getflashplayer\" type=\"application/x-shockwave-flash\" scale=\"noscale\"></embed></object>');
}

function promotion(lang)
{
	if (lang == "en")
	{
		document.write('<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0\" width=\"200\" height=\"190\"><param name=\"movie\" value=\"flash/promotion.swf\"><param name=\"quality\" value=\"high\"><param name=\"wmode\" value=\"transparent\"><embed src=\"flash/promotion.swf\" quality=\"high\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" type=\"application/x-shockwave-flash\" width=\"200\" height=\"190\" wmode=\"transparent\"></embed></object>');
	}
	if (lang == "tr")
	{
		document.write('<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0\" width=\"200\" height=\"190\"><param name=\"movie\" value=\"flash/promotion_tr.swf\"><param name=\"quality\" value=\"high\"><param name=\"wmode\" value=\"transparent\"><embed src=\"flash/promotion_tr.swf\" quality=\"high\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" type=\"application/x-shockwave-flash\" width=\"200\" height=\"190\" wmode=\"transparent\"></embed></object>');
	}
}
