// JavaScript Document
<!--
var pre;
	var nex;
	
	function big(obj){
		pre = document.all ? obj.previousSibling : obj.previousSibling.previousSibling;
		nex = document.all ? obj.nextSibling : obj.nextSibling.nextSibling;
		if (pre && pre.tagName != 'IMG') pre = pre.previousSibling;
		if (nex && nex.tagName != 'IMG') nex = nex.nextSibling;
		//alert(nex.tagName);
		url = obj.src.replace('/t/', '/l/');
		wiNovi=open('','displayWindow','left=180px,top=150px,width=640,height=460,status=no,resizable=no,toolbar=no,scrollbars=no,menubar=no');
		wiNovi.document.open();
		var html = '';
		html += '<html><head><title>Large Photo</title>';
		html += '<style>img{display:block} a{font-family:Verdana, Arial; font-size:14px; text-decoration:none; color:#000} a:hover{text-decoration:underline; color:#444}</style></head>';
		html += '<body marginheight="0" marginwidth="0" leftmargin="0" topmargin="0">';
		html += '<a href="javascript:window.close()"><img border="0" src="' + url + '" alt="click to close" /></a>';
		html += '<table align="center" cellpadding="0" cellspacing="5"><tr><td width="100" align="right">';
		if(pre) html += '<a href="javascript://" onclick="window.opener.goPrev()">&laquo; back</a>';
		html += '</td><td width="100" align="left">';
		if(nex) html += '<a href="javascript://" onclick="window.opener.goNext()">next &raquo;</a>';
		html += '</td></tr></table>';
		html += '</body></html>';
		wiNovi.document.write(html);
		wiNovi.document.close();
	}
	
	function goPrev(){
		big(pre);
	}
	
	function goNext(){
		big(nex);
	}



function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}


function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

// BOOK ONLINE LINK
function OpenBrWindow(theURL,winName,features, myWidth, myHeight, isCenter) { //v3.0
  if(window.screen)if(isCenter)if(isCenter=="true"){
    var myLeft = (screen.width-myWidth)/2;
    var myTop = (screen.height-myHeight)/2;
    features+=(features!='')?',':'';
    features+=',left='+myLeft+',top='+myTop;
  }
  window.open(theURL,winName,features+((features!='')?',':'')+'width='+myWidth+',height='+myHeight);
}


// slide show
var slideShowSpeed = 4000
var crossFadeDuration = 8
var Pic = new Array() 

Pic[0] = '_img/1.jpg'
Pic[1] = '_img/2.jpg'
Pic[2] = '_img/3.jpg'
Pic[3] = '_img/4.jpg'

var t
var j = 0
var p = Pic.length

var preLoad = new Array()
for (i = 0; i < p; i++){
   preLoad[i] = new Image()
   preLoad[i].src = Pic[i]
}

function runSlideShow(){
   if (document.all){
      document.images.SlideShow.style.filter="blendTrans(duration=2)"
      document.images.SlideShow.style.filter="blendTrans(duration=crossFadeDuration)"
      document.images.SlideShow.filters.blendTrans.Apply()      
   }
   document.images.SlideShow.src = preLoad[j].src
   if (document.all){
      document.images.SlideShow.filters.blendTrans.Play()
   }
   j = j + 1
   if (j > (p-1)) j=0
   t = setTimeout('runSlideShow()', slideShowSpeed)
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

//-->
