function openWin(pic_name,pic_width,pic_height) 
{

	if(pic_name=="freeTrip.gif")
	{
		InspectionTours();
	}else
	{
		var top, left
	
		top=10;
		left=100;
		if(pic_width==null){pic_width=250}
		if(pic_height==null){pic_height=200}
		window.open("big_pic.html?NoReSize=0&pic_name=images/Large/"+pic_name,"New","width="+pic_width+",height="+pic_height+",resizable=0,scrollbars=0,top="+ top +",left="+ left );
	}
}

function openPopImg(pic_name,pic_width,pic_height) 
{

	var top, left

	top=10;
	left=100;
	if(pic_width==null){pic_width=250}
	if(pic_height==null){pic_height=200}
	window.open("big_pic.html?NoReSize=0&pic_name="+pic_name,"New","width="+pic_width+",height="+pic_height+",resizable=0,scrollbars=0,top="+ top +",left="+ left );
}

function drawMenu(item)
{
	document.write("<table BORDER=0 CELLPADDING=0 CELLSPACING=0>\n");
	drawBut("contact_us","ContactUsSwf",154,28);
	drawBut("seaterra_projects","SeaterraProjectsSwf",154,28);
	document.write("<tr><td height='5px'></td></tr>");
	
/*
		drawBut("seaterra_reserve","SeaterraReserveSwf",154,28);
		drawBut("location","LocationSwf",154,28);
		drawBut("site_plan","SitePlanSwf",154,28);
		drawBut("apartment_plans","ApartmentPlansSwf",154,28);
		drawBut("building_specification","BuildingSpecificationSwf",154,28);
		drawBut("pricelist","PricelistSwf",154,28);
		drawBut("virtual_tour","VirtualTourSwf",154,28);
		drawBut("site_photographs","SitePhotographsSwf",154,28);
		drawBut("faq","FaqSwf",154,28);
*/
		drawBut("inspection_trip","InspectionTripSwf",154,28);
		drawBut("testimonials","TestimonialsSwf",154,28);
//		drawBut("investor_packages","InvestorPackagesSwf",154,28);
		drawBut("about_us","AboutUsSwf",154,28);
//		drawBut("package","PackageSwf",154,28);
	document.write("</table>\n");
}

function drawBut(butName,butID,width,height)
{
	document.write("<tr><td><OBJECT classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' ");
	document.write(" WIDTH='"+width+"' HEIGHT='"+height+"' id='"+butID+"' ALIGN=''>");
	document.write("<PARAM NAME='movie' VALUE='../SeaterraReserve/buts/"+butName+".swf'> <PARAM NAME='quality' VALUE='high'> <PARAM NAME='bgcolor' VALUE='#E6EDDA'> <EMBED src='../SeaterraReserve/buts/"+butName+".swf' quality='high' bgcolor='#E6EDDA'  WIDTH='"+width+"' HEIGHT='"+height+"' NAME='"+butID+"' ALIGN='' ");
	document.write(" TYPE='application/x-shockwave-flash' PLUGINSPAGE='http://www.macromedia.com/go/getflashplayer'></EMBED> ");
	document.write(" </OBJECT></td></tr>");
}

function drawImage(image)
{
	document.write("<tr>\n");
	document.write("	<td>\n");
	document.write("		<img src='"+ image +"' border='0'>\n");
	document.write("	</td>\n");
	document.write("</tr>\n");
}

function SetLocation(item)
{
	switch (item)
	{
		case "ContactUs" : window.location.href = "Contact.html";
						break;
		case "SeaterraProjects" : window.location.href = "http://www.cyprus-seaterra.com";
						break;
		case "Faq"		: window.location.href = "../SeaterraReserve/FAQ.php";
						break;
		case "InspectionTrip"		: window.location.href = "http://www.cyprus-seaterra.com/InspectionTrip.php";
						break;
		case "Testimonials"	: window.location.href = "http://www.cyprus-seaterra.com/testimonials.php";
						break;	
		case "AboutUs"	: window.location.href = "http://www.cyprus-seaterra.com/AboutUs.php";
						break;
		case "SeaterraReserve" : document.location = "http://www.cyprus-seaterra.com/SeaterraReserve/";
						break;
	   case "ShowFlat" : 
						document.location = "http://www.cyprus-seaterra.com/SeaTerraBay/ShowFlatUser.php";					
	}
}

function drawFreeBut()
{
	document.write("<OBJECT classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' ")
	document.write(" WIDTH='150' HEIGHT='32' id='But_Home1' ALIGN=''>")
	document.write("<PARAM NAME=movie VALUE='../InspectionTrips.swf'> <PARAM NAME=quality VALUE=high> <PARAM NAME=bgcolor VALUE=#FFFFFF> <EMBED src=../SeaTerraBay/but_free.swf quality=high bgcolor=#FFFFFF  WIDTH='100' HEIGHT='32' NAME='but_free' ALIGN='' ")
	document.write(" TYPE='application/x-shockwave-flash' PLUGINSPAGE='http://www.macromedia.com/go/getflashplayer'></EMBED> ")
	document.write(" TYPE='application/x-shockwave-flash' PLUGINSPAGE='http://www.macromedia.com/go/getflashplayer'></EMBED> ")
	document.write(" </OBJECT>")
}

function drawLangButs()
{
	document.write("<a href='../SeaTerraBay-German/index.html'><img src='../SeaTerraBay/images/german_normal.jpg' alt='Deutsch' style='border-style:none'></a>");
	document.write("&nbsp;<a href='../SeaTerraBay/index.html'><img src='../SeaTerraBay/images/uk_invisible.jpg' alt='English' style='border-style:none'></a>");
}

function EnlargeBlock(block)
{
	window.open("PicEnlarge.Html?PicPath=" + block);
}

function drawFooter()
{
	document.write('<BR>');
	document.write('<table class="sFooter"  style="width: 650">');
	document.write('	<tr>');
	document.write('		<td align="center">');
	document.write('		<span style="height: 3px; width: 95%; border-top: 3px solid #F78326;"></span></td>');
	document.write('	</tr>');
	document.write('	<tr>');
	document.write('		<td align="center">');
	document.write('			<span class="sFooter"><a class="sFooter" href="http://www.cyprus-seaterra.com">Northern Cyprus Property</a> Home Page</span>');
	document.write('			<img src="images/bullet.png">');
	document.write('			<span class="sFooter">SeaTerra Bay <a class="sFooter" href="../SeaTerraBay/Index.html">Northern Cyprus Property Development</a></span>');
	document.write('		</td>');
	document.write('	</tr>');
	document.write('	<tr>');
	document.write('		<td align="center">');
	document.write('			<span class="sFooter"><a class="sFooter" href="../northcyprus-properties/index.html">Northern Cyprus Properties in Esentepe</a> Area</span>');
	document.write('			<img src="images/bullet.png">');	
	document.write('			<span class="sFooter"><a class="sFooter" href="../northerncyprus-properties/index.html">Northern Cyprus Properties in Tatlisu</a> Area</span>');
	document.write('		</td>');
	document.write('	</tr>');
	document.write('	<tr>');
	document.write('		<td align="center">');
	document.write('			<span class="sFooter"><a class="sFooter" href="../sitemap.html">North Cyprus Properties Site Map</a></span>');
	document.write('			<img src="images/bullet.png">');
	document.write('			<span class="sFooter"><a class="sFooter" href="../SeaTerraBay/location.html">North Cyprus Map</a></span>');
	document.write('			<img src="images/bullet.png"> ');
	document.write('			<span class="sFooter"><a class="sFooter" href="contact.html">Contact us</a></span>');
	document.write('		</td>');
	document.write('	</tr>');
	document.write('</table>');
}

function InspectionTours()
{
//	var pic_top;
//	var pic_left;
//	var pic_width=575;
//	var pic_height=535;
//	var w = window.open("../InspectionTrips.html","New","width="+pic_width+",height="+pic_height+",resizable=0,scrollbars=0,top="+pic_top+",left="+pic_left);
//	w.focus();
window.location.href = "http://www.cyprus-seaterra.com/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();
window.location.href = "../Seaterrareserve/Title_reserve.php";
}

function drawCallUs()
{
	document.write("<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0' width='190' height='50' id='CALL US3' align='middle'>")
	document.write("<param name='allowScriptAccess' value='sameDomain' />")
	document.write("<param name='movie' value='Call_Us.swf' />")
	document.write("<param name='quality' value='high' />")
	document.write("<param name='wmode' value='transparent' />")
	document.write("<param name='bgcolor' value='#ffcc33' />")
	document.write("<embed src='Call_Us.swf' quality='high' wmode='transparent' bgcolor='#ffcc33' width='190' height='50' name='CALL US3' align='middle' allowScriptAccess='sameDomain' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' />")
	document.write("</object>")
}

function drawHeader(hl_image)
{
	document.write("<table BORDER='0' CELLPADDING='0' CELLSPACING='0' width='720'>");
	document.write("<tr><td rowspan=3 align='left' valign='bottom'><IMG SRC='../SeaTerraBay/images/"+hl_image+"'></td>");
	document.write("	<td rowspan=3 align=right><script>drawCallUs()</script></td>");
	document.write("	<td align=right><script>drawLangButs()</script></td></tr>");
	document.write("<tr><td align=right><script>drawFreeBut()</script></td></tr></table>");
}

/*draws the little text in the buttom of pages: Pricelist for all units ..
  gets 1 parameter: boolean displayHeader which display or not the header*/
function drawArrangeTripAdd(displayHeader)
{
	document.write("<span class=\"txt\"><p>");
	if(displayHeader){
	document.write("<a href=\"http://www.cyprus-seaterra.com/SeaTerraBay/Price_List.php\">Pricelist for all units </a><br>");
	}
	document.write("<a href=\"http://www.cyprus-seaterra.com/SeaTerraBay/Testimonials.html\"><b>Read what others have to say </b></a>about purchasing their homes in SeaTerra Bay<br>");
	document.write("<strong>Want to arrange a trip?<br>");
	document.write("More information? <a href=\"http://www.cyprus-seaterra.com/SeaTerraBay/Contact.html\">Click here</a> </strong> or call <span style=\"color:#FF0000 \">toll free in the UK:<br>");
	document.write("0800-849-4168 or + 90-533-8613588 </span></p></span>");
}		
				
function onRow(row)
{
	row.style.background="#E5DE8E";
	row.cells(0).children(0).src = "../SeaTerraBay/Images/bullet_ro.jpg";
}
			
function outRow(row)
{
	row.style.background="#E9E6C8";
	row.cells(0).children(0).src = "../SeaTerraBay/Images/bullet_n.jpg";
}				

function SetImageSrc(imgID,newImage)
{
	document.getElementById(imgID).src = newImage;
}


//Testimonials 

function drawPageing(divid, pages)
{
	var path = document.location.search.substring(1).split('=')[1];
	if (path == null){path = 1;}
    var cp = path;
    var prev=path;
	var e = document.getElementById(divid);
	if (prev > 1){e.innerHTML = "<ul class='nav'>\n<a class='liLink' href='Testimonials.html?page=" + --prev + "'><li style='cursor:hand;' class='liItem'>&#60;&nbsp;Previous" + "</li></a>";}
	else{e.innerHTML = "<ul class='nav'>\n<li class='liItem'>&#60;&nbsp;Previous" + "</li>";}
	for (var i=1;i<=pages;i++) 
	{
        if (cp==i){e.innerHTML = e.innerHTML + "\n" + "<a  class='liSelectLink' href='Testimonials.html?page=" + i + "'>" + "<li style='cursor:hand;' class='liselected'>"  + i + " </li></a>";}
		else{e.innerHTML = e.innerHTML + "\n" + "<a  class='liLink' href='Testimonials.html?page=" + i + "'>" + "<li style='cursor:hand;' class='liItem'>"  + i + " </li></a>";}
	}
	if (path < pages){ e.innerHTML = e.innerHTML + "\n" + "<a class='liLink' href='Testimonials.html?page=" + ++path + "'>" + "<li style='cursor:hand;' class='liItem'>Next&nbsp;></li></a>";}
	else{e.innerHTML = e.innerHTML + "\n" + "<li class='liItem'>Next&nbsp;></li>";}
	e.innerHTML = e.innerHTML + "\n" + "<ul>";
}

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";
}

