//Browser Sniffer Script CS1.1
var exclude=1;
var agt=navigator.userAgent.toLowerCase();
var win=0;var mac=0;var lin=1;
if(agt.indexOf('win')!=-1){win=1;lin=0;}
if(agt.indexOf('mac')!=-1){mac=1;lin=0;}
var lnx=0;if(lin){lnx=1;}
var ice=0;
var ie=0;var ie4=0;var ie5=0;var ie6=0;var com=0;var dcm;
var op5=0;var op6=0;var op7=0;
var ns4=0;var ns6=0;var ns7=0;var mz7=0;var kde=0;var saf=0;
if(typeof navigator.vendor!="undefined" && navigator.vendor=="KDE"){
	var thisKDE=agt;
	var splitKDE=thisKDE.split("konqueror/");
	var aKDE=splitKDE[1].split("; ");
	var KDEn=parseFloat(aKDE[0]);
	if(KDEn>=2.2){
		kde=1;
		ns6=1;
		exclude=0;
		}
	}
else if(agt.indexOf('webtv')!=-1){exclude=1;}
else if(typeof window.opera!="undefined"){
	exclude=0;
	if(/opera[\/ ][5]/.test(agt)){op5=1;}
	if(/opera[\/ ][6]/.test(agt)){op6=1;}
	if(/opera[\/ ][7-9]/.test(agt)){op7=1;}
	}
else if(typeof document.all!="undefined"&&!kde){
	exclude=0;
	ie=1;
	if(typeof document.getElementById!="undefined"){
		ie5=1;
		if(agt.indexOf("msie 6")!=-1){
			ie6=1;
			dcm=document.compatMode;
			if(dcm!="BackCompat"){com=1;}
			}
		}
	else{ie4=1;}
	}
else if(typeof document.getElementById!="undefined"){
	exclude=0;
	if(agt.indexOf("netscape/6")!=-1||agt.indexOf("netscape6")!=-1){ns6=1;}
	else if(agt.indexOf("netscape/7")!=-1||agt.indexOf("netscape7")!=-1){ns6=1;ns7=1;}
	else if(agt.indexOf("gecko")!=-1){ns6=1;mz7=1;}
	if(agt.indexOf("safari")!=-1 || (typeof document.childNodes!="undefined" && typeof document.all=="undefined" && typeof navigator.taintEnabled=="undefined")){mz7=0;ns6=1;saf=1;}
	}
else if((agt.indexOf('mozilla')!=-1)&&(parseInt(navigator.appVersion)>=4)){
	exclude=0;
	ns4=1;
	if(typeof navigator.mimeTypes['*']=="undefined"){
		exclude=1;
		ns4=0;
		}
	}
if(agt.indexOf('escape')!=-1){exclude=1;ns4=0;}
if(typeof navigator.__ice_version!="undefined"){exclude=1;ie4=0;}
//  End -->

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

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];}}
}

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_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function openWin(url,windowName,options){
	var WindowHandle=window.open(url,windowName,options);
}

function MM_validateForm() { //v4.0
  var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments;
  for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=MM_findObj(args[i]);
    if (val) { nm=val.name; if ((val=val.value)!="") {
      if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');
        if (p<1 || p==(val.length-1)) errors+='- '+nm+' must contain an e-mail address.\n';
      } else if (test!='R') { num = parseFloat(val);
        if (isNaN(val)) errors+='- '+nm+' must contain a number.\n';
        if (test.indexOf('inRange') != -1) { p=test.indexOf(':');
          min=test.substring(8,p); max=test.substring(p+1);
          if (num<min || max<num) errors+='- '+nm+' must contain a number between '+min+' and '+max+'.\n';
    } } } else if (test.charAt(0) == 'R') errors += '- '+nm+' is required.\n'; }
  } if (errors) alert('The following error(s) occurred:\n'+errors);
  document.MM_returnValue = (errors == '');
}

<!-- Begin Image rotation
var timeDelay = 4; // change delay time in seconds
var Pix = new Array
("/images/photo1.jpg","/images/photo2.jpg","/images/photo3.jpg","/images/photo4.jpg","/images/photo5.jpg","/images/photo6.jpg");
var howMany = Pix.length;
timeDelay *= 1000;
var PicCurrentNum = 0;
var PicCurrent = new Image();
PicCurrent.src = Pix[PicCurrentNum];
function startPix() {
setInterval("slideshow()", timeDelay);
}
function slideshow() {
PicCurrentNum++;
if (PicCurrentNum == howMany) {
PicCurrentNum = 0;
}
PicCurrent.src = Pix[PicCurrentNum];
document["ChangingPix"].src = PicCurrent.src;
}
//  End -->

<!-- Begin Photo gallery
var aryPhotos = new Array();
var intCurrentIndex = 0;
var intPlaySpeed = 5000; // 5 Seconds
var TimeOutID;
				   aryPhotos[0] = "/images/gallery/photo1.jpg";
				   aryPhotos[1] = "/images/gallery/2-1.jpg";
				   aryPhotos[2] = "/images/gallery/photo12.jpg";
				   aryPhotos[3] = "/images/gallery/2-2.jpg";		
				   aryPhotos[4] = "/images/gallery/photo16.jpg";		
				   aryPhotos[5] = "/images/gallery/2-3.jpg";		
				   aryPhotos[6] = "/images/gallery/photo11.jpg";		
				   aryPhotos[7] = "/images/gallery/2-4.jpg";		
				   aryPhotos[8] = "/images/gallery/photo10.jpg";		
				   aryPhotos[9] = "/images/gallery/2-5.jpg";
				   aryPhotos[10] = "/images/gallery/photo7.jpg";				  
				   aryPhotos[11] = "/images/gallery/2-6.jpg";
				   aryPhotos[12] = "/images/gallery/photo15.jpg";
				   aryPhotos[14] = "/images/gallery/photo13.jpg";
<!-- Begin Play function				   
function Play()
{   
  changePhoto('imgPhoto', 'next');    
  TimeOutID = setTimeout('Play()', intPlaySpeed); 
  //alert(TimeOutID)
}
<!-- Begin Stop function
function Stop()
{
 clearTimeout(TimeOutID); 
}
				  <!-- Begin change photo function
				  function changePhoto(strImageName, strDirection){
				  
					if(strDirection == "previous"){
						if(intCurrentIndex != 0){
							intCurrentIndex--;
						}
						else{
							intCurrentIndex = aryPhotos.length - 1;
						}
					}else if(strDirection == "next"){
						if(intCurrentIndex < aryPhotos.length - 1){
							intCurrentIndex++;
						}
						else{
							intCurrentIndex = 0
						}
					}else{
							intCurrentIndex = strDirection
						}
					
				  	eval("document." + strImageName + ".src = '" + aryPhotos[intCurrentIndex] + "';");
					// Only works on IE so...
					if (ie) {
						document.imgPhoto.style.filter = " blendTrans(duration=1.5)";
						// document.imgPhoto.style.filter = "revealTrans(duration=1.0,transition=7) blendTrans(duration=1.5)";
						// Other transitions:
						// Fade(duration=1.0,overlap=0.5) gradientWipe(duration=1000, gradientsize=5.5) blendTrans(duration=1.5)
						
						// Applying Filters
						document.imgPhoto.filters(0).Apply();
						// document.imgPhoto.filters(1).Apply();
						// document.imgPhoto.filters(2).Apply();
						
						document.imgPhoto.filters(0).Play();
						// document.imgPhoto.filters(1).Play();
						// document.imgPhoto.filters(2).Play();
						}				
				  }
//  End -->
