var txtSplash = new Array(4);
txtSplash[0] = 'We are proud to offer you an opportunity to experience Turkmen hospitality. Our hotel is located right in the heart of the regional capital <a href="location.php">Mary</a>, a modern industrial and cultural center and once legendary &quot;Maru-Shahu-Jahan&quot;.<p>By staying in Yrsgal Hotel, you will also be enjoying easy access to the downtown amenities. Moreover the region includes major historical sites of <a href="margush.php">Margush and Ancient Merv</a> which have attracted thousands of tourists.';
txtSplash[1] = 'Located on the Great Silk Road, the <a href="mary_region.php">Ancient Merv</a> had magnificent epithets like <b>&quot;The Stronghold of the World&quot;, &quot;The Dome of Islam&quot;, &quot;The Spirits of Kings&quot;</b>. It attracted scientists and merchants from the Moslem world.<p>The ancient country Margush or Margiana is also a major attraction. Scientists assume that the first worldwide religion Zoroastrianism is connected with the country of Margush. Archeological materials can be seen at the Mary Museum exhibitions.';
txtSplash[2] = 'Our restaurant located on the first floor of our hotel is a favorite dining destination for Mary city-dwellers.<br>  An exquisite selection from Turkmen cuisine will make you familiar with the culinary traditions of Turkmenistan. Moreover, food from European kitchen is also available to meet your expectations. <p>At our lobby bar you can order coffee, tea or choose from a wide assortment of appetizers and soft drinks. A friendly service will make sure that your wishes are realized.';
txtSplash[3] = '<p>A wide variety of <a href="accommodations.php">accommodation</a> options, exquisite taste from <a href="restaurants.php">traditional Turkmen and European cuisine</a>, <a href="entertainment.php">entertainment</a> options combined with friendly service is to guarantee that your stay will become an unforgettably pleasant memory.<p>Hotel Yrsgal has also barber, beauty salon, computer center, car parking. Hotel personnel speak English, Russian, Turkmen, Turkish. At our hotel we believe that our guests deserve the best and we do our utmost to ensure that they get it.';
var picSplash = new Array('turkmen_hotel_entrance_night_view.jpg','turkmen_hotel_sanjar_highlight2.jpg','turkmen_hotel_bar_highlight.jpg','turkmen_hotel_amenities.jpg');

var picSplashHead = new Array('division_welcome_to_yrsgal.gif','division_discover.gif','turkmen_restaurants.gif','division_enjoy_your_stay.gif');

function openNewWindow(url, width, height)
{
	window.open("images/" + url, "Yeni", "width=" + (parseInt(width) + 30) + ",height=" + (parseInt(height) + 30) + ",menubar=no,scrollbars=no,resizable=yes,top=0,left=0");
}

function makevisible(cur,which){
strength=(which==0)? 1 : 0.7

if (cur.style.MozOpacity)
cur.style.MozOpacity=strength
else if (cur.filters)
cur.filters.alpha.opacity=strength*100
}


function menuin(obj)
{
	obj.style.visibility="visible";
	//alert(obj);
	//obj.src = 'images/icon_green.gif';
}

function menuout(obj)
{
	obj.style.visibility="hidden";
}

function validateForm(type,str)
{
	var errors ='UYARILAR:\n';
	switch(type)
	{
		case "email":
			if((str.indexOf("@")<1) || (str.length<5) || (str.indexOf(".")==-1))
			{
				errors+= str + ' geçerli bir e-posta adresi değil.\n';
			}
			break;
	}
	if(errors!='UYARILAR:\n')
	{
		alert(errors);
		return false;
	}
	else
	{
		return true;
	}
}



function DoTransition(img)
{
		var obj = eval("document.images.imgSplash");
		obj.filters[0].apply();
		obj.src = "images/" + picSplash[img];
		obj.filters[0].play(duration=1);

		var obj = eval("document.images.imgSplashHead");
		obj.filters[0].apply();
		obj.src = "images/" + picSplashHead[img];
		obj.filters[0].play(duration=1);

		obj = eval("document.all.splashtext");
		obj.filters[0].apply();
		obj.innerHTML = txtSplash[img];
		obj.filters[0].play(duration=1);
}

function myaction(str)
{
	switch(str)
	{
		case 'submit':
			if(CompareDate(document.forms.items.txtDatein.value,document.forms.items.txtDateout.value)!='smaller')
			{
				alert('Check-in date must be smaller than Check-out date!');
			}
			else
			{
				document.forms.items.submit();
			}
			break;
		case 'cancel':
			document.forms.items.action.value = 'main';
			document.forms.items.submit();
			break;
		default:
	}
}

function enlarge(url, width, height)
{
	var myobj = eval("document.all.pictureframe");
	//alert(myobj);
	//find center of the window
	myobj.style.top = (screen.availHeight-height)/2;
	myobj.style.left = (screen.availWidth-width)/2;
	myobj.style.display = "block";
	//myobj.display = "none";
	//myobj.innerHTML = "<img src=\'images\\" + url + "\'>";
	document.images.bigpicture.src = "images\\" + url;
}

function dislarge()
{
	var myobj = eval("document.all.pictureframe");
	myobj.style.display = "none";
}