
function zxcBAnimator(zxcmde,zxcobj,zxcsrt,zxcfin,zxctime){
 if (typeof(zxcobj)=='string'){ zxcobj=document.getElementById(zxcobj); }
 if (!zxcobj||(!zxcsrt&&!zxcfin)||zxcsrt==zxcfin) return;
 var zxcoop=zxcobj[zxcmde.replace(/[-#]/g,'')+'oop'];
 if (zxcoop){
  clearTimeout(zxcoop.to);
  if (zxcoop.srtfin[0]==zxcsrt&&zxcoop.srtfin[1]==zxcfin&&zxcmde.match('#')) zxcoop.update([zxcoop.data[0],(zxcoop.srtfin[0]==zxcoop.data[2])?zxcfin:zxcsrt],zxctime);
  else zxcoop.update([zxcsrt,zxcfin],zxctime);
 }
 else zxcobj[zxcmde.replace(/[-#]/g,'')+'oop']=new zxcBAnimatorOOP(zxcmde,zxcobj,zxcsrt,zxcfin,zxctime);
}

function zxcBAnimatorOOP(zxcmde,zxcobj,zxcsrt,zxcfin,zxctime){
 this.srtfin=[zxcsrt,zxcfin];
 this.to=null;
 this.obj=zxcobj;
 this.mde=zxcmde.replace(/[-#]/g,'');
 this.update([zxcsrt,zxcfin],zxctime);
}

zxcBAnimatorOOP.prototype.update=function(zxcsrtfin,zxctime){
 this.time=zxctime||this.time||2000;
 this.data=[zxcsrtfin[0],zxcsrtfin[0],zxcsrtfin[1]];
 this.srttime=new Date().getTime();
 this.cng();
}

zxcBAnimatorOOP.prototype.cng=function(){
 var zxcms=new Date().getTime()-this.srttime;
 this.data[0]=(this.data[2]-this.data[1])/this.time*zxcms+this.data[1];
 if (this.mde!='left'&&this.mde!='top'&&this.data[0]<0) this.data[0]=0;
 if (this.mde!='opacity') this.obj.style[this.mde]=this.data[0]+'px';
 else  zxcOpacity(this.obj,this.data[0]);
 if (zxcms<this.time) this.to=setTimeout(function(zxcoop){return function(){zxcoop.cng();}}(this),10);
 else {
  this.data[0]=this.data[2];
  if (this.mde!='opacity') this.obj.style[this.mde]=this.data[0]+'px';
  else zxcOpacity(this.obj,this.data[0]);
 }
}

function zxcOpacity(zxcobj,zxcopc){
 if (zxcopc<0||zxcopc>100) return;
 zxcobj.style.filter='alpha(opacity='+zxcopc+')';
 zxcobj.style.opacity=zxcobj.style.MozOpacity=zxcobj.style.KhtmlOpacity=zxcopc/100-.001;
}

 

function Bounce(id,start,finish1,time1,finish2,time2){
 var zxcobj=document.getElementById(id);
 zxcobj.style.display="block";
 clearTimeout(zxcobj.bto);
 zxcBAnimator('top',zxcobj,start,finish1,time1);
 zxcobj.bto=setTimeout(function(){ zxcBAnimator('top',zxcobj,finish1,finish2,time2); },time1);
}
 
 
   function closeGreeting_wanted()    {
	   if (document.getElementById("wanted").style.display=='block') {
		   	document.getElementById("wanted").style.display='none';
			}
	  } 
	  
function leaves(){
document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="451" height="43" title="Emarald Ayurvedic Resort">');
document.write('<param name="movie" value="webimages/swf/leaves.swf" />');
document.write('<param name="wmode" value="transparent" />');
document.write('<param name="quality" value="high" />');
document.write('<embed src="webimages/swf/leaves.swf" quality="high" wmode="transparent" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="451" height="43"></embed>');
document.write('</object>');
}
function banner_img(){
			images=new Array(1);
			images[0]="webimages/banner1.jpg";
			images[1]="webimages/01.jpg";
			images[2]="webimages/02.jpg";
			images[3]="webimages/03.jpg";
			images[4]="webimages/04.jpg";
			images[5]="webimages/05.jpg";
			images[6]="webimages/06.jpg";
			images[7]="webimages/07.jpg";
			images[8]="webimages/08.jpg";
			images[9]="webimages/09.jpg";
			images[10]="webimages/10.jpg";
			images[11]="webimages/11.jpg";
			images[12]="webimages/12.jpg";
			images[13]="webimages/13.jpg";
			images[14]="webimages/14.jpg";
			images[15]="webimages/15.jpg";
			images[16]="webimages/16.jpg";
			i=Math.floor(Math.random() * images.length);
			document.write("<table id='show'  width='100%'  border='0' cellpadding='0' cellspacing='0'bgcolor='#8DC212' background='"+images[i]+"' style='background-repeat:no-repeat;' height='385' title='Ayurvedic Treatments are Available at Emarald Ayurvedic Resort for Various Ailments.'><tr height='385' valign='top' > <td width='421' height='385' valign='top'>");
			
document.write('<table width="905" border="0" cellspacing="0" cellpadding="0" >');
document.write('<tr>');
document.write('<td height="202" align="left" valign="top">&nbsp;</td>');
document.write('<td height="202" align="left" valign="top">&nbsp;</td>');
document.write('<td width="37" rowspan="2" align="right" valign="top"><a href="http://in-bookings.intechhs.com/BookingTool/mywebsite/homepage.aspx?shortname=silentvalley" target="_blank" onmouseover="document.MyImage1.src=\'webimages/restaurant_r.gif\';" onmouseout="document.MyImage1.src=\'webimages/restaurant.gif\';" title="Click here for resort menu"><img src="webimages/restaurant.gif" title="Click here for resort menu" alt="Click here for resort menu"  width="37" height="182"  border="0" name="MyImage1" style="filter:alpha(opacity=75);"/></a></td>');
document.write('</tr>');
document.write('<tr>');
document.write('<td width="37" align="left" valign="top"><a href="http://in-bookings.intechhs.com/BookingTool/mywebsite/homepage.aspx?shortname=silentvalley" target="_blank" onmouseover="document.MyImage.src=\'webimages/book_online_r.gif\';" onmouseout="document.MyImage.src=\'webimages/book_online.gif\';" title="Click here for our online booking"><img src="webimages/book_online.gif" title="Click here for our online booking" alt="Click here for our online booking"  width="37" height="182"  border="0" name="MyImage" style="filter:alpha(opacity=75);"/></a></td>');
document.write('<td width="831" align="left" valign="top">&nbsp;</td>');
document.write('</tr>');
document.write('</table></td>');
document.write('</tr>');
document.write('</table>');	
			
}
