// JavaScript Document

var pic1= new Image(100,25); 
var pic2= new Image(100,25); 

var emailfilter=/^\w+[\+\.\w-]*@([\w-]+\.)*\w+[\w-]*\.([a-z]{2,4}|\d+)$/i;
var blockedEmailIds = new Array("accenture", "yahoo", "gmail", "hotmail","rediffmail", "infosys","wipro","patni","tcs","cognizant","satyam");

function $() {
	var elements = new Array();
	for (var i = 0; i < arguments.length; i++) {
		var element = arguments[i];
		if (typeof element == 'string')
			element = document.getElementById(element);
		if (arguments.length == 1)
			return element;
		elements.push(element);
	}
	return elements;
}

var objTabContent, objTab, objCurTab;
var curtab=0;
var closetab=0, tmpclosetab=0, transtimer=0;

//var rootpath="http://fs4/hcltech/"
var rootpath=""

function changeTab(tabid) {	
	closetab=0;
	stop_timer();

	if (curtab==tabid) return;
	objTabContent=document.getElementById("tabcontent");
	if (curtab==0) {
		objTabContent.style.display="";
		objTabContent.style.visibility="visible";
	}
	objTab=document.getElementById("mnuTab"+tabid);
	objCurTab=document.getElementById("mnuTab"+curtab);
	objTabContent.innerHTML="";
	objTabContent.style.height="442px";
	switch(tabid) {
		case 1:
			objTabContent.innerHTML+="<div class='tnav_box'><table width='770' cellpadding='0' cellspacing='0' border='0' height='100' bgcolor='#FFFFFF' style='background-image:url(estilos/WhyHanstonImg.png); background-repeat:no-repeat;'><tr><td colspan='3'><img src='estilos/spacer.gif' width='1' height='41' hspace='0' vspace='0' border='0' /></td></tr>	<tr><td colspan='3' class='Heading30White' align='center'>Premier real estate agent in Marbella</td></tr><tr><td colspan='3'><img src='estilos/spacer.gif' width='1' height='50' hspace='0' vspace='0' border='0' /></td></tr><tr><td width='113'  height='31'><img src='estilos/spacer.gif' width='113' height='1' hspace='0' vspace='0' border='0' /></td><td align='right'><img src='estilos/tellafriend.png' width='113' height='31' hspace='0' vspace='0' border='0' /></td><td width='35'><img src='estilos/spacer.gif' width='35' height='1' hspace='0' vspace='0' border='0' /></td></tr><tr><td colspan='3'><img src='estilos/spacer.gif' width='1' height='15' hspace='0' vspace='0' border='0'/></td></tr><tr><td width='113'  height='31'><img src='estilos/spacer.gif' width='113' height='1' hspace='0' vspace='0' border='0' /></td><td align='left' class='TabsContent'><div style='padding-left:200px;'>Hanston Marbella believes passionately in Partnership with our clients, offering a unique advantage to supply a professional range of services, all conveniently under one roof. Coupled with our natural attention to detail and established presence in Marbella, it&quot;s no wonder why we are the leading choice for all property needs.<br>Our philosophy is that a client is for life and we place 100% commitment in each and every assignment.<br><br>&nbsp;&nbsp;&nbsp;&nbsp;Free Expert Advice & Guidance<Br>&nbsp;&nbsp;&nbsp;&nbsp;Highly Motivated Team<Br>&nbsp;&nbsp;&nbsp;&nbsp;Proactive Marketing Strategies<Br>&nbsp;&nbsp;&nbsp;&nbsp;Professional & friendly hands-on approach<Br>&nbsp;&nbsp;&nbsp;&nbsp;Listening & understanding your requirements<br></div></td><td width='35'><img src='estilos/spacer.gif' width='35' height='1' hspace='0' vspace='0' border='0' /></td></tr><tr><td colspan='3'><img src='estilos/spacer.gif' width='1' height='10' hspace='0' vspace='0' border='0' /></td></tr></table></div>";
			break;
		case 2:
			objTabContent.innerHTML+="<div class='tnav_box'><table width='770' cellpadding='0' cellspacing='0' border='0' height='422' bgcolor='#FFFFFF'><tr><td><img src='estilos/spacer.gif' width='35' height='1' hspace='0' vspace='0' border='0' /></td><Td valign='top' align='left'><br /><br /><span class='Heading30'>Selling your home</span><br /><br /><span class='TabsContent'>The dynamic Hanston Marbella team has been selling properties on the Costa del Sol for more than 6 years. We have sold a variety of homes from apartments, penthouses to townhouses, villas and millionaire mansions. We have got it down to a fine art with our dedication and market understanding, reaching through our collaborating agents, networks, established database, portals etc. Through this international exposure we will make sure your property is promoted actively and in the right place.<br />In the present global economic climate the property market has been the first to feel the pinch. The Costa del Sol is no exception and we have had plenty of competition from emerging overseas markets. We have recognized the changing market and used it as our catalyst for a new innovative way forward which combines the best of our experience, credibility and refined services that are better suited to our clients' new requirements.<br />We know only too well that, thanks to the worldwide web, we have come up with an innovative range of up-to-date solutions to help you sell your Costa del Sol property in today's ever-changing and evolving marketplace.</span></Td><td><img src='estilos/SellingYourHomeImg.png' width='301' height='383' hspace='0' vspace='0' border='0' /></td></tr></table></div>";
			break;
			
		case 3:
			objTabContent.innerHTML+="<div class='tnav_box'><table width='770' cellpadding='0' cellspacing='0' border='0' height='422' bgcolor='#FFFFFF'><tr><td><img src='estilos/spacer.gif' width='35' height='1' hspace='0' vspace='0' border='0'></td><Td valign='top' align='left'><br><br><span class='Heading30'>Buying a home</span><br><br><span class='TabsContent'>Buying a property in Spain can be a very enriching affair, both financially and in terms of enhancing your happiness and quality of life. When purchasing a home on the Costa del sol, your peace of mind is especially important to us whether you're a first-time buyer, investor or looking for your next ideal home on the coast. Hanston Marbella follows a complete due diligence programme for all properties listed that adheres to the Spanish law, Decree 218. Meaning that all properties are checked prior to selling, are freehold and more importantly legal.<br /><br />Our expert team will guide you, assist you and simply narrow down your search in order to find your perfect property for the best value for money. When buying in Spain it's important to consider purchase taxes and fees which amount to around 10 per cent of the purchase price of your property. Please request our Buyers Guide for full details.</span></Td><td><img src='estilos/BuyingHomeImg.png' width='301' height='332' hspace='0' vspace='0' border='0'></td></tr></table></div>";			
			break;
		case 4:
			objTabContent.innerHTML+="<div class='tnav_box'><table width='770' cellpadding='0' cellspacing='0' border='0' height='422' bgcolor='#FFFFFF'><tr><td><img src='estilos/FreeBuyersGuideImg.gif' width='295' height='422' hspace='0' vspace='0' border='0' /></td><td><img src='estilos/spacer.gif' width='40' height='1' hspace='0' vspace='0' border='0' /></td><Td valign='top' align='left'><br /><br /><span class='Heading20'>FREE Buyer's guide for property in Spain</span><br /><br /><span class='TabsContent'>To receive your free Buyers Guide, please fill in your complete details below. <br><br><b>Many thanks and enjoy</b></span><Br /><br /><form action='sendemail-guide.php' method='post'><table width='250' cellpadding='2' cellspacing='0' border='0' align='center'><tr><td>&nbsp;</td><td class='text11'>Please complete all fields</td></tr>	<tr><td align='right' width='100' class='text12grey'>* First Name :</td><td align='right' width='150'><input type='text' width='150px;' /></td></tr><tr><td align='right' class='text12grey'>* Last Name :</td><td align='right' width='150'><input type='text' width='150px;' /></td></tr><tr><td align='right' class='text12grey'>* Phone :</td><td align='right' width='150'><input type='text' width='150px;' /></td></tr><tr><td align='right' class='text12grey'>* Email :</td><td align='right' width='150'><input type='text' width='150px;' /></td></tr><tr><td align='right' class='text12grey'>&nbsp;</td><td align='right' width='150'><br /><input type='submit' value='Send Details' width='150px;' /></td></tr></table></Td><td><img src='estilos/spacer.gif' width='40' height='1' hspace='0' vspace='0' border='0' /></td></tr></table></div>";
			break;
		default:
			objTabContent.innerHTML="<div class='tnav_box'><table width='770' cellpadding='0' cellspacing='0' border='0' height='422' bgcolor='#FFFFFF' style='background-image:url(estilos/WhyHanstonImg.png); background-repeat:no-repeat;'><tr><td colspan='3'><img src='estilos/spacer.gif' width='1' height='41' hspace='0' vspace='0' border='0' /></td></tr>	<tr><td colspan='3' class='Heading30White' align='center'>Premier real estate agent in Marbella</td></tr><tr><td colspan='3'><img src='estilos/spacer.gif' width='1' height='77' hspace='0' vspace='0' border='0' /></td></tr><tr><td width='113'  height='31'><img src='estilos/spacer.gif' width='113' height='1' hspace='0' vspace='0' border='0' /></td><td align='right'><img src='estilos/tellafriend.png' width='113' height='31' hspace='0' vspace='0' border='0' /></td><td width='35'><img src='estilos/spacer.gif' width='35' height='1' hspace='0' vspace='0' border='0' /></td></tr><tr><td colspan='3'><img src='estilos/spacer.gif' width='1' height='35' hspace='0' vspace='0' border='0'/></td></tr><tr><td width='113'  height='31'><img src='estilos/spacer.gif' width='113' height='1' hspace='0' vspace='0' border='0' /></td><td align='left' class='TabsContent'><div style='padding-left:200px;'>HANSTON MARBELLA is a sales and service organisation specialised in the High-End of the Real Estate market in the area of Marbella, Spain. Apart negotiating and selling of luxurious villa's, apartments and penthouses, is our emphasis on guidance in all the steps involved, from the idea-moment till the deliverance of your dream house<br /><br />We also deal in larger investment projects. Our clients appreciate our serious, professional, and yet, friendly approach to business; we are confident that you will appreciate it too. <br /><br /></div></td><td width='35'><img src='estilos/spacer.gif' width='35' height='1' hspace='0' vspace='0' border='0' /></td></tr><tr><td colspan='3'><img src='estilos/spacer.gif' width='1' height='10' hspace='0' vspace='0' border='0' /></td></tr></table></div>";

	}
	objTab.className+=" over";
	if (curtab>0) {
		objCurTab.className=objCurTab.className.replace(" over", "");
	}
	curtab=tabid;
}

function closeme() {
	closetab=1;
	tmpclosetab=0;
	closethistab();	
}

function closethistab() {
	transtimer=setTimeout("closethistab()",10);
	if (!closetab) {
		stop_timer();
	} else {
		if (tmpclosetab<100) {
			tmpclosetab++;
		} else {
			stop_timer();
			objTabContent=document.getElementById("tabcontent");
			objCurTab=document.getElementById("mnuTab"+curtab);
			objCurTab.className=objCurTab.className.replace(" over", "");			
			objTabContent.style.display="none";
			objTabContent.style.visibility="hidden";
			curtab=0;
		}
	}
}

function stop_timer() {
	clearTimeout(transtimer); transtimer=0;
	tmpclosetab=0;
	closetab=0;
}

function talktome() {
		if ($("txtname").value.replace(/^\s*|\s*$/g,"")==""){
			alert ("Enter your Name");
			$("txtname").focus();
			return;
		} else if (emailfilter.test($("txtemailid").value)==false) {
			alert ("Enter valid E-Mail ID");
			$("txtemailid").focus();
			return;
		} else if ($("txtphone").value.replace(/^\s*|\s*$/g,"")==""){
			alert ("Enter your Contact No.");
			$("txtphone").focus();
			return;
		} else if ($("txtcomments").value.replace(/^\s*|\s*$/g,"")==""){
			alert ("Enter your comments");
			$("txtcomments").focus();
			return;
		}
		
		document.frmttm.submit();
	}
	
function show_content(){	
		navRoot = document.getElementById("more_content");
	if (navRoot.className=="hidden_content"){
		navRoot.className="show_content";
	}
	else if (navRoot.className=="show_content"){
		navRoot.className="hidden_content";
		}	
}

function collapse(hd,des){
	if ($(hd).className=="hd expand") {
		$(hd).className="hd collapse";
		$(des).className="bnlnk over";
	} else {
		$(hd).className="hd expand";
		$(des).className="bnlnk";
	}
}


//Functions for display or hide a object
function showmore(objid, objmore, objless) {
	$(objid).style.display="block";
	$(objmore).style.display="none";
	$(objless).style.display="";
}

function showless(objid, objmore, objless) {
	$(objid).style.display="none";
	$(objmore).style.display="";
	$(objless).style.display="none";
}
/* END */

//Code for Right Navigation
function resetRNTab() {
	var v = document.getElementById("txtpageinfo").value;
	splitvalues = v.split("|");
	if (document.getElementById("rnav"+splitvalues[0])) {
		changeRNTab(splitvalues[1],splitvalues[2]);
		document.getElementById("rnav"+splitvalues[0]).className+=" active";
	}
}

function changeRNTab(actTabId, hideTabId) {	
	if (actTabId==0 || hideTabId==0) return;
	var actTab=document.getElementById("rntab"+actTabId);
	var hideTab=document.getElementById("rntab"+hideTabId);
	if (actTab.className=="active") return;
	actTab.className="active";
	hideTab.className="";
	
	var actContent=document.getElementById("rncontent"+actTabId);
	var hideContent=document.getElementById("rncontent"+hideTabId);
	
	actContent.className="active";
	hideContent.className="";
}
window.onload=resetRNTab;
