function openWin(pic_name,pic_width,pic_height) 
{

	if(pic_name=="freeTrip.gif")
	{
		InspectionTours();
	}
}


function drawBut(butName,butTD,width,height)
{
	document.write("<tr><OBJECT classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' ");
	document.write(" WIDTH='"+width+"' HEIGHT='"+height+"' id='But_Home1' ALIGN=''>");
	document.write("<PARAM NAME='movie' VALUE='buts/" + butName + ".swf'> <PARAM NAME='quality' VALUE='high'> <PARAM NAME='bgcolor' VALUE='#F6F4DE'> <EMBED src='buts/" + butName + ".swf' quality='high' bgcolor='#F6F4DE'  WIDTH='"+width+"' HEIGHT='"+height+"' NAME='But_Home1' ALIGN='' ");
	document.write(" TYPE='application/x-shockwave-flash' PLUGINSPAGE='http://www.macromedia.com/go/getflashplayer'></EMBED> ");
	document.write(" </OBJECT></td></tr>");
}

function SetLocation(item)
	{
		switch (item)
		{
			case "ShowFlat" : 
						document.location = "http://www.cyprus-seaterra.com/SeaTerraBay/ShowFlatUser.php";
							break;
			case "SeaterraEsentepe" :
			document.location = "http://www.cyprus-seaterra.com/Northcyprus-properties";
			spEvent('EsentepeAerialFlash', 1,'Link to Esentepe from Aerial-Flash',"  http://www.cyprus-seaterra.com/Northcyprus-properties/",0);
							break;
			case "SeaterraMarina" :
			document.location = "http://www.cyprus-seaterra.com/Northerncyprus-properties";
			spEvent('MarinaAerialFlash', 1,'Link to Marina from Aerial-Flash',"  http://www.cyprus-seaterra.com/Northerncyprus-properties/",0);
							break;
			case "SeaterraBay" :
			document.location = "http://www.cyprus-seaterra.com/SeaTerraBay/";
			 spEvent('BayAerialFlash', 1,'Link to Bay from Aerial-Flash',"  http://www.cyprus-seaterra.com/SeaTerraBay/",0);
							break;
			case "SeaterraReserve" :
			document.location = "http://www.cyprus-seaterra.com/SeaTerraReserve/";
			spEvent('ResreveAerialFlash', 1,'Link to Resreve from Aerial-Flash',"  http://www.cyprus-seaterra.com/SeaTerraReserve/",0);
							break;
			case "SeaterraVillas" :
			document.location = "http://www.cyprus-seaterra.com/SeaTerraVillas/";
			spEvent('VillasAerialFlash', 1,'Link to Villas from Aerial-Flash',"  http://www.cyprus-seaterra.com/SeaTerraVillas/",0);
							break;
	
			case "InspectionTrips" : 
			document.location = "http://www.cyprus-seaterra.com/SeaTerraReserve/InspectionTrip.php";
			spEvent('inspection trips', 1,'Link to inspection trips',"http://www.cyprus-seaterra.com/Seaterrareserve/InspectionTrip.php",0);
			break;
			
			case "Exhibitions" : 
			document.location = "http://www.cyprus-seaterra.com/Exhibitions.php";
			spEvent('ExhibitionsBTN', 1,' BTN Link to Exhibitions ',"http://www.cyprus-seaterra.com/Exhibitions.php",0);
			 break;	
					
			case "SpecialChritamsOffer" : 
			window.open("http://www.cyprus-seaterra.com/SpecialChritamsOffer.php", "SpecialChritamsOffer",'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=645,height=445,left=212,top=134' );
			spEvent('SpecialChritamsOffer', 1,'Link to SpecialChritamsOffer',"http://www.cyprus-seaterra.com/SpecialChritamsOffer.php",0);
					break;
					
					
					
		}
	}
	
	function SetImageSrc(imgID,newImage)
	{
		document.getElementById(imgID).src = newImage;
	}
	
	function SelectCityChanged()
	{
		var selectFld = document.getElementById('SelectCity');
		var indexToShow = selectFld.selectedIndex;
		for(i=0;i<selectFld.length;i=i+1)
		{
			if(i != indexToShow)
			{
				document.getElementById('WeatherPanel' + i).style.display = 'none';
			}
		}
		document.getElementById('WeatherPanel' + indexToShow).style.display = '';
		
	}
function InspectionTours()
{
window.location.href = "http://www.cyprus-seaterra.com/Seaterrareserve/InspectionTrip.php";
}

function Title()
{
//	var pic_top;
//	var pic_left;
//	var pic_width=555;
//	var pic_height=450;
//	var w = window.open("../Title.html","New","width="+pic_width+",height="+pic_height+",resizable=0,scrollbars=0,top="+pic_top+",left="+pic_left);
//	w.focus();
document.location = "http://www.cyprus-seaterra.com/SeaTerraReserve/Title_reserve.php";
}

function SetImageSrc(imgID,newImage)
{
	document.getElementById(imgID).src = newImage;
}


//Testimonials 

function gotopage()
{
	var TitlesBank=  new Array ( "Villas in Cyprus", "Properties in Cyprus", "Cyprus properties", "Cyprus property", "Cyprus property" );
	var path = document.location.search.substring(1).split('=')[1];
    if (path == null) {path="1";}
	document.title = "Testimonials - " + TitlesBank[path-1] ;
	/*var e = document.getElementById("page" + path);
	e.style.display = "block";*/
	
}

//general
function swap(Name, SwapImage)
{
 
  document.images[Name].src = SwapImage;
 
}

function WantUSSend()
{
 document.location = 'http://www.cyprus-seaterra.com/SeaTerraReserve/ContactUs.php';
 spEvent('senduslink packages', 1,'Link to want us to send you', "http://www.cyprus-seaterra.com/SeaTerraReserve/ContactUs.php", 1);
}


function spEvent(group,type,name,url,target) {
    try {
        sma_event(group,type,name,url,target);
    }
    catch (error) {};
}

function mailto(n) 
{
	n = n.replace(/\^/, '@');
	n = n.replace(/\~/, 'mailto:');
	n = n.replace(/\`/, '.');
	document.location.href=n;
}
