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_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_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 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_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

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_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 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;
}




// =================================================================
//           =====  SVG/VML vector menu  =====
// script written by Gerard Ferrandez - Ge-1-doot - June 28, 2006
// http://www.dhteumeuleu.com
// =================================================================

document.onselectstart = new Function("return false;");

function resize() {
	with (document.getElementById("canvas")) {
		nw = offsetWidth;
		nh = offsetHeight;
	}
}
onresize = resize;

document.onmousemove = function(e) {
	if (window.event) e=window.event;
	xm = (e.x || e.clientX);
	ym = (e.y || e.clientY);
}

//////////////////////////////////////////////////////////

m = {
	O : [],
	cont : 0,
	xm : 0,
	ym : 0,
	nw : 0,
	nh : 0,
	X : 0,
	Y : 0,
	X0 : 0,
	Y0 : 0,
	ox : 0,
	oy : 0,
	drag : false,
	Odraged : 0,
	ks : 0,
	////////////////////////////////////////////
	//FR : 3,       // friction
	FR : 1,       // friction
	//vL : 200,     // default length
	vL : 200,     // default length
	//vR : 1.33,    // reduction ratio
	vR : 1.6,    // reduction ratio ... size of menu dot
	cC : "#000",  // collapsed node
	cP : "#f00",  // default  node
	cE : "#666",  // expanded node
	cL : "#ccc",  // lines
	sT : "#000",  // stroke
	sS : "#f00",  // stroke over
	tX : "#666",  // text
	tS : "#000",  // text selected
	//sP : 20,      // dot size
	sP : 28,      // dot size
	//rS : .002,    // rotation speed
	rS : .003,    // rotation speed
	////////////////////////////////////////////

	CreateNode : function (parent, label, col, link) {
		/* ==== init variables ==== */
		this.link = link;
		this.col = col;
		this.pR = 0;
		this.len = 0;
		this.len_ini = 0;
		this.lex = 0;
		this.angle = 0;
		this.angle_ini = 0;
		this.expanded = false;
		this.children = [];
		this.parent = parent;
		this.parent_ini = parent;
		this.visible = false;
		this.x = 0;
		this.y = 0;

		if (parent != "") {
			/* ==== push child ==== */
			parent.children.push(this);
			/* ==== calculate lengths & angles ==== */
			var a = (2 * Math.PI) / parent.children.length;
			var b = (parent != "") ? Math.random():0;
			for (var i in parent.children) {
				with (parent.children[i]) {
					angle = angle_ini = Math.PI / 2 + a * i + b;
					len = len_ini = parent.len_ini / m.vR;
				}
			}
		} else {
			/* ==== root ==== */
			this.visible = true;
			this.len_ini = m.vL * m.vR;
		}

		/* ==== create line & text elements ==== */
		this.line = $createLine(1, m.cL);
		this.text = document.createElement("span");
		this.text.onmousedown = function() { return false; };
		this.text.appendChild(document.createTextNode(label));
		this.text.style.color = m.tX;
		document.getElementById("canvas").appendChild(this.text);

		/* ==== main animation loop ==== */
		this.run = function () {
			with (this) {
				if (visible) {
					/* ==== parent coordinates ==== */
					xp = parent ? parent.x : m.X;
					yp = parent ? parent.y : m.Y;
					/* ==== trigonometry ==== */
					var a = Math.atan2((y + Math.sin(angle + m.ks) * m.FR) - yp, (x + Math.cos(angle + m.ks) * m.FR) - xp);
					if (lex < len) lex += (len - lex) * .1;
					x = xp + Math.cos(a) * lex;
					y = yp + Math.sin(a) * lex;
					/* ==== screen limits ==== */
					if (x < pR) x = pR; else if (x > nw - pR) x = nw - pR;
					if (y < pR) y = pR; else if (y > nh - pR) y = nh - pR;
					/* ==== move elements ==== */
					line.$move(x, y, xp, yp);
					plot.$move(x, y, pR);
					with (text.style) {
						left = Math.round(x + pR + 5) + "px"; // this controls the distance from dot to text
						top = Math.round(y - pR / 1.8) + "px"; // this controls the distance from dot to text
					}
				}
			}
		}

		/* ==== collapse node ==== */
		this.collapse = function () {
			with (this) {
				expanded = false;
				text.style.color = m.tX;
				plot.$fillColor((children.length) ? m.cC : col);
				for (var i=0; i<children.length; i++) {
					with (children[i]) {
						visible = false;
						lex = 0;
						//line.$move(-1, -1, -1, -2);
						line.$move(-1, -1, -1, -2);
						//plot.$move(-1000, -1, 0);
						plot.$move(-1000, -1, 0);
						text.style.left = "-1000px";
						expanded = false;
						collapse();
					}
				}
			}
		}

		/* ==== expand node ==== */
		this.expand = function () {
			with (this) {
				/* ==== close all other branchs ==== */
				if (parent_ini != "")
					for (var i=0; i<parent_ini.children.length; i++)
						parent_ini.children[i].collapse();
				/* ==== expand ==== */
				expanded = true;
				text.style.color = m.tS;
				plot.$fillColor(m.cE);
				for (var i=0; i<children.length; i++) {
					children[i].visible = true;
					children[i].lex = 0;
				}
			}
		}
	},

	/* ==== mouse down event ==== */
	mousedown : function() {
		var o = this.obj;
		/* ==== cursor ==== */
		o.plot.style.cursor = "move";
		document.body.style.cursor = "move";
		/* ==== offset mouse ==== */
		m.ox = xm - o.x;
		m.oy = ym - o.y;
		m.X0 = xm;
		m.Y0 = ym;
		if (!m.drag) {
			m.drag = true;
			/* ==== change root ==== */
			if (m.Odraged != o) {
				/* ==== reset ==== */
				for (var i in m.O) {
					with (m.O[i]) {
						parent = parent_ini;
						len    = len_ini;
						lex    = len_ini;
						angle  = angle_ini;
					}
				}
				/* ==== search for root path ==== */
				var oc = [];
				var ow = o;
				oc.push(ow);
				while(ow.parent != "") {
					ow = ow.parent;
					oc.push(ow);
				}
				/* ==== inverse vectors ==== */
				for (var i=1; i<oc.length; i++) {
					oc[i].lex    = oc[i-1].len_ini;
					oc[i].len    = oc[i-1].len_ini;
					oc[i].angle  = oc[i-1].angle_ini - Math.PI;
					oc[i].parent = oc[i-1];
				}
				/* ==== switch root ==== */
				o.parent = "";
				o.len = 0;
				o.lex = 0;
				o.angle = 0;
				m.Odraged.plot.$strokeColor(m.sT);
				m.Odraged.plot.$strokeWeight(1);
				m.Odraged = o;
			}
			return false;
		}
	},

	/* ==== mouse up event ==== */
	mouseup : function() {
		m.drag = false;
		/* ==== cursor ==== */
		m.Odraged.plot.style.cursor = "pointer";
		document.body.style.cursor = "crosshair";
		/* ==== click ==== */
		if (Math.abs(m.X + m.ox - m.X0) < 5 && Math.abs(m.Y + m.oy - m.Y0) < 5) {
			if (this.obj.link) {
				/* ==== open hyperlink ==== */
				window.open(this.obj.link, "_blank");
			} else {
				/* ==== expand / collapse ==== */
				if (this.obj.expanded) this.obj.collapse(); else this.obj.expand();
			}
		}
		return false;
	},

	/* ==== mouse over event ==== */
	mouseover : function() {
		this.$strokeColor(m.sS);
		this.$strokeWeight(Math.round(Math.max(2, this.obj.pR / 3)));
		return false;
	},

	/* ==== mouse out event ==== */
	mouseout : function() {
		if (this.obj != m.Odraged) {
			this.$strokeColor(m.sT);
			this.$strokeWeight(1);
		}
		return false;
	},

	/* ==== motion thread ==== */
	run : function () {
		if (m.drag) m.X = xm - m.ox, m.Y = ym - m.oy;
		m.ks += m.rS;
		for (var i in m.O) m.O[i].run();
	},

	/* ==== parse menu DOM ==== */
	setMenuTree : function (theNode, parent) {
		if (theNode.tagName == "DIV" || theNode.tagName == "A") {
			/* ==== Node Label ==== */
			var s = theNode.innerHTML;
			var d = s.toUpperCase().indexOf("<DIV");
			if (d > 0) s = s.substring(0, d);
			d = s.toUpperCase().indexOf("<A");
			if (d > 0) s = s.substring(0, d);
			/* ==== create Node ==== */
			if(theNode.style.color != "") m.cP = theNode.style.color;
			parent = new m.CreateNode(parent, s, m.cP, theNode.href);
			/* ==== push Node ==== */
			m.O.push(parent);

		}
		/* ==== recursive call ==== */
		for (var i = 0; i < theNode.childNodes.length; i++)
			m.setMenuTree(theNode.childNodes[i], parent);
	},

	/* ==== init menu ==== */
	init : function() {
		m.vL = nh / 4;
		m.X = nw / 2;
		m.Y = nh / 2;
		m.setMenuTree(document.getElementById("menu"), "");

		/* ==== create plots (no z-index in SVG!) ==== */
		for (var i in m.O) {
			m.O[i].pR = Math.round(Math.max(5, m.sP * m.O[i].len_ini / 200));
			m.O[i].plot = $createOval(m.O[i].pR * 2, true);
			m.O[i].plot.$strokeColor(m.sT);
			m.O[i].plot.$strokeWeight(1);
			m.O[i].plot.obj = m.O[i];
			m.O[i].plot.onmousedown = m.mousedown;
			m.O[i].plot.onmouseup = m.mouseup;
			m.O[i].plot.onmouseover = m.mouseover;
			m.O[i].plot.onmouseout = m.mouseout;
			m.O[i].plot.onclick = function() { return false; };
			m.O[i].text.style.fontSize = (4 + m.O[i].pR) + "px";
		}

		/* ==== expand 1st Node ==== */
		m.Odraged = m.O[0];
		m.O[0].collapse();
		m.O[0].expand();
	}
}

onload = function() {

	/* ==== initial size ==== */
	resize();
	/* ==== create SVGVML container ==== */
	cont = $createSVGVML(document.getElementById("canvas"), false);
	if (cont) {
		/* ==== init menu ==== */
		m.init();
		setInterval("m.run();", 16);
	}
}
//////////////////////////////////////////////////////
// SVG-VML mini graphic library 
// ==========================================
// written by Gerard Ferrandez
// initial version - June 28, 2006
// modified - July 21 - use object functions
// modified - July 24 - debug
// www.dhteumeuleu.com
//////////////////////////////////////////////////////

var SVG = false;
var svgNS = false;
var svgAntialias = false;
if (document.createElementNS) {
	svgNS = "http://www.w3.org/2000/svg";
	svg = document.createElementNS(svgNS, "svg");
	SVG = (svg.x != null);
}

if (SVG) {
	/* ============= SVG ============== */
	$createSVGVML = function(o, antialias) {
		cont = document.createElementNS(svgNS, "svg");
		o.appendChild(cont);
		svgAntialias = antialias;
		return cont;
	}
	$createLine = function(w, col, linecap) {
		var o = document.createElementNS(svgNS, "line");
		o.setAttribute("shape-rendering", svgAntialias?"auto":"optimizeSpeed");
		o.setAttribute("stroke-width", Math.round(w)+"px");
		if (col) o.setAttribute("stroke", col);
		if (linecap) o.setAttribute("stroke-linecap", linecap);
		o.$move = function(x1, y1, x2, y2) {
			this.setAttribute("x1", x1);
			this.setAttribute("y1", y1);
			this.setAttribute("x2", x2);
			this.setAttribute("y2", y2);
		}
		o.$RGBcolor = function(R, G, B){ this.setAttribute("stroke", "rgb("+Math.round(R)+","+Math.round(G)+","+Math.round(B)+")"); }
		o.$strokeWidth = function(s){ this.setAttribute("stroke-width", Math.round(s)+"px"); }
		cont.appendChild(o);
		return o;
	}
	$createPolyline = function(w, points, col) {
		var o = document.createElementNS(svgNS, "polyline");
		o.setAttribute("shape-rendering", svgAntialias?"auto":"optimizeSpeed");
		o.setAttribute("stroke-width", Math.round(w));
		if (col) o.setAttribute("stroke", col);
		o.setAttribute("fill", "none");
		if (points) o.setAttribute("points", points);
		cont.appendChild(o);
		return o;
	}
	$createOval = function(diam, filled) {
		var o = document.createElementNS(svgNS, "circle");
		o.setAttribute("shape-rendering", svgAntialias?"auto":"optimizeSpeed");
		o.setAttribute("stroke-width", 0);
		o.setAttribute("r", Math.round(diam / 2));
		o.style.cursor = "pointer";
		o.$move = function(x1, y1, radius) {
			this.setAttribute("cx", x1);
			this.setAttribute("cy", y1);
			this.setAttribute("r", Math.round(radius));
		}
		o.$strokeColor = function(col) { this.setAttribute("stroke", col); }
		o.$fillColor = function(col) { this.setAttribute("fill", col); }
		o.$strokeWeight = function(sw) { this.setAttribute("stroke-width", sw); }
		cont.appendChild(o);
		return o;
	}
	
} else if (document.createStyleSheet) {

	/* ============= VML ============== */
	$createSVGVML = function(o, antialias) {
		document.namespaces.add("v", "urn:schemas-microsoft-com:vml");
		var style = document.createStyleSheet();
		style.addRule('v\\:*', "behavior: url(#default#VML);");
		style.addRule('v\\:*', "antialias: "+antialias+";");
		return o;
	}
	$createLine = function(w, col, linecap) {
		var o = document.createElement("v:line");
		o.strokeweight = Math.round(w)+"px";
		if (col) o.strokecolor = col;
		o.$move = function(x1, y1, x2, y2) {
			this.to   = x1 + "," + y1;
			this.from = x2 + "," + y2;
		}
		o.$RGBcolor = function(R, G, B){ this.strokecolor = "rgb("+Math.round(R)+","+Math.round(G)+","+Math.round(B)+")"; }
		o.$strokeWidth = function(s){ this.strokeweight = Math.round(s)+"px"; }
		if (linecap) {
			s = document.createElement("v:stroke");
			s.endcap = linecap;
			o.appendChild(s);
		}
		cont.appendChild(o);
		return o;
	}
	$createPolyline = function(w, points, col) {
		var o = document.createElement("v:polyline");
		o.strokeweight = Math.round(w)+"px";
		if (col) o.strokecolor = col;
		o.points = points;
		s = document.createElement("v:fill");
		s.on = "false";
		o.appendChild(s);
		cont.appendChild(o);
		return o;
	}
	$createOval = function(diam, filled) {
		var o = document.createElement("v:oval");
		o.style.position = "absolute";
		o.style.cursor = "pointer";
		o.strokeweight = 1;
		o.filled = filled;
		o.style.width = diam + "px";
		o.style.height = diam + "px";
		o.$move = function(x1, y1, radius) {
			with (this.style) {
				left = Math.round(x1 - radius) + "px";
				top = Math.round(y1 - radius) + "px";
				width = Math.round(radius * 2) + "px";
				height = Math.round(radius * 2) + "px";
			}
		}
		o.$strokeColor = function(col) { this.strokecolor = col; }
		o.$fillColor = function(col) { this.fillcolor = col; }
		o.$strokeWeight = function(sw) { this.strokeweight = sw; }
		cont.appendChild(o);
		return o;
	}
	
} else {
	/* ==== no script ==== */
	createSVG = function(o) {
		return false;
	}
}


/***********************************************
* Ultimate Fade-In Slideshow (v1.5): © Dynamic Drive (http://www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for this script and 100s more.
***********************************************/
 
var fadeimages=new Array()
//SET IMAGE PATHS. Extend or contract array as needed
fadeimages[0]=["yorkstone_natural_stone_images/slideshow1.jpg", "", ""] //plain image syntax
fadeimages[1]=["yorkstone_natural_stone_images/slideshow2.jpg", "", ""]
fadeimages[2]=["yorkstone_natural_stone_images/slideshow3.jpg", "", ""]
fadeimages[3]=["yorkstone_natural_stone_images/slideshow4.jpg", "", ""]
fadeimages[4]=["yorkstone_natural_stone_images/slideshow5.jpg", "", ""]
fadeimages[5]=["yorkstone_natural_stone_images/slideshow6.jpg", "", ""]

var fadebgcolor="white"
 
////NO need to edit beyond here/////////////
 
var fadearray=new Array() //array to cache fadeshow instances
var fadeclear=new Array() //array to cache corresponding clearinterval pointers
 
var dom=(document.getElementById) //modern dom browsers
var iebrowser=document.all
 
function fadeshow(theimages, fadewidth, fadeheight, borderwidth, delay, pause, displayorder){
this.pausecheck=pause
this.mouseovercheck=0
this.delay=delay
this.degree=10 //initial opacity degree (10%)
this.curimageindex=0
this.nextimageindex=1
fadearray[fadearray.length]=this
this.slideshowid=fadearray.length-1
this.canvasbase="canvas"+this.slideshowid
this.curcanvas=this.canvasbase+"_0"
if (typeof displayorder!="undefined")
theimages.sort(function() {return 0.5 - Math.random();}) //thanks to Mike (aka Mwinter) :)
this.theimages=theimages
this.imageborder=parseInt(borderwidth)
this.postimages=new Array() //preload images
for (p=0;p<theimages.length;p++){
this.postimages[p]=new Image()
this.postimages[p].src=theimages[p][0]
}
 
var fadewidth=fadewidth+this.imageborder*2
var fadeheight=fadeheight+this.imageborder*2
 
if (iebrowser&&dom||dom) //if IE5+ or modern browsers (ie: Firefox)
document.write('<div id="master'+this.slideshowid+'" style="position:relative;width:'+fadewidth+'px;height:'+fadeheight+'px;overflow:hidden;"><div id="'+this.canvasbase+'_0" style="position:absolute;width:'+fadewidth+'px;height:'+fadeheight+'px;top:0;left:0;filter:progid:DXImageTransform.Microsoft.alpha(opacity=10);-moz-opacity:10;-khtml-opacity:10;background-color:'+fadebgcolor+'"></div><div id="'+this.canvasbase+'_1" style="position:absolute;width:'+fadewidth+'px;height:'+fadeheight+'px;top:0;left:0;filter:progid:DXImageTransform.Microsoft.alpha(opacity=10);-moz-opacity:10;background-color:'+fadebgcolor+'"></div></div>')
else
document.write('<div><img name="defaultslide'+this.slideshowid+'" src="'+this.postimages[0].src+'"></div>')
 
if (iebrowser&&dom||dom) //if IE5+ or modern browsers such as Firefox
this.startit()
else{
this.curimageindex++
setInterval("fadearray["+this.slideshowid+"].rotateimage()", this.delay)
}
}

function fadepic(obj){
if (obj.degree<100){
obj.degree+=10
if (obj.tempobj.filters&&obj.tempobj.filters[0]){
if (typeof obj.tempobj.filters[0].opacity=="number") //if IE6+
obj.tempobj.filters[0].opacity=obj.degree
else //else if IE5.5-
obj.tempobj.style.filter="alpha(opacity="+obj.degree+")"
}
else if (obj.tempobj.style.MozOpacity)
obj.tempobj.style.MozOpacity=obj.degree/101
else if (obj.tempobj.style.KhtmlOpacity)
obj.tempobj.style.KhtmlOpacity=obj.degree/100
}
else{
clearInterval(fadeclear[obj.slideshowid])
obj.nextcanvas=(obj.curcanvas==obj.canvasbase+"_0")? obj.canvasbase+"_0" : obj.canvasbase+"_1"
obj.tempobj=iebrowser? iebrowser[obj.nextcanvas] : document.getElementById(obj.nextcanvas)
obj.populateslide(obj.tempobj, obj.nextimageindex)
obj.nextimageindex=(obj.nextimageindex<obj.postimages.length-1)? obj.nextimageindex+1 : 0
setTimeout("fadearray["+obj.slideshowid+"].rotateimage()", obj.delay)
}
}
 
fadeshow.prototype.populateslide=function(picobj, picindex){
var slideHTML=""
if (this.theimages[picindex][1]!="") //if associated link exists for image
slideHTML='<a href="'+this.theimages[picindex][1]+'" target="'+this.theimages[picindex][2]+'">'
slideHTML+='<img src="'+this.postimages[picindex].src+'" border="'+this.imageborder+'px">'
if (this.theimages[picindex][1]!="") //if associated link exists for image
slideHTML+='</a>'
picobj.innerHTML=slideHTML
}
 
 
fadeshow.prototype.rotateimage=function(){
if (this.pausecheck==1) //if pause onMouseover enabled, cache object
var cacheobj=this
if (this.mouseovercheck==1)
setTimeout(function(){cacheobj.rotateimage()}, 100)
else if (iebrowser&&dom||dom){
this.resetit()
var crossobj=this.tempobj=iebrowser? iebrowser[this.curcanvas] : document.getElementById(this.curcanvas)
crossobj.style.zIndex++
fadeclear[this.slideshowid]=setInterval("fadepic(fadearray["+this.slideshowid+"])",50)
this.curcanvas=(this.curcanvas==this.canvasbase+"_0")? this.canvasbase+"_1" : this.canvasbase+"_0"
}
else{
var ns4imgobj=document.images['defaultslide'+this.slideshowid]
ns4imgobj.src=this.postimages[this.curimageindex].src
}
this.curimageindex=(this.curimageindex<this.postimages.length-1)? this.curimageindex+1 : 0
}
 
fadeshow.prototype.resetit=function(){
this.degree=10
var crossobj=iebrowser? iebrowser[this.curcanvas] : document.getElementById(this.curcanvas)
if (crossobj.filters&&crossobj.filters[0]){
if (typeof crossobj.filters[0].opacity=="number") //if IE6+
crossobj.filters(0).opacity=this.degree
else //else if IE5.5-
crossobj.style.filter="alpha(opacity="+this.degree+")"
}
else if (crossobj.style.MozOpacity)
crossobj.style.MozOpacity=this.degree/101
else if (crossobj.style.KhtmlOpacity)
crossobj.style.KhtmlOpacity=obj.degree/100
}
 
 
fadeshow.prototype.startit=function(){
var crossobj=iebrowser? iebrowser[this.curcanvas] : document.getElementById(this.curcanvas)
this.populateslide(crossobj, this.curimageindex)
if (this.pausecheck==1){ //IF SLIDESHOW SHOULD PAUSE ONMOUSEOVER
var cacheobj=this
var crossobjcontainer=iebrowser? iebrowser["master"+this.slideshowid] : document.getElementById("master"+this.slideshowid)
crossobjcontainer.onmouseover=function(){cacheobj.mouseovercheck=1}
crossobjcontainer.onmouseout=function(){cacheobj.mouseovercheck=0}
}
this.rotateimage()
}

function validate(field) {
var valid = "1234567890"
var ok = "yes";
var temp;
for (var i=0; i<field.value.length; i++) {
temp = "" + field.value.substring(i, i+1);
if (valid.indexOf(temp) == "-1") ok = "no";
}
if (ok == "no") {
alert("PLEASE USE NUMBERS ONLY ... do not use letters or other characters.");
field.focus();
field.select();
   }
}


//Chrome Drop Down Menu- Author: Dynamic Drive (http://www.dynamicdrive.com)
//Last updated: Jan 1st, 06'

var cssdropdown={
disappeardelay: 250, //set delay in miliseconds before menu disappears onmouseout

//No need to edit beyond here////////////////////////
dropmenuobj: null, ie: document.all, firefox: document.getElementById&&!document.all,

getposOffset:function(what, offsettype){
var totaloffset=(offsettype=="left")? what.offsetLeft : what.offsetTop;
var parentEl=what.offsetParent;
while (parentEl!=null){
totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop;
parentEl=parentEl.offsetParent;
}
return totaloffset;
},

showhide:function(obj, e, visible, hidden){
if (this.ie || this.firefox)
this.dropmenuobj.style.left=this.dropmenuobj.style.top="-500px"
if (e.type=="click" && obj.visibility==hidden || e.type=="mouseover")
obj.visibility=visible
else if (e.type=="click")
obj.visibility=hidden
},

iecompattest:function(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
},

clearbrowseredge:function(obj, whichedge){
var edgeoffset=0
if (whichedge=="rightedge"){
var windowedge=this.ie && !window.opera? this.iecompattest().scrollLeft+this.iecompattest().clientWidth-15 : window.pageXOffset+window.innerWidth-15
this.dropmenuobj.contentmeasure=this.dropmenuobj.offsetWidth
if (windowedge-this.dropmenuobj.x < this.dropmenuobj.contentmeasure)  //move menu to the left?
edgeoffset=this.dropmenuobj.contentmeasure-obj.offsetWidth
}
else{
var topedge=this.ie && !window.opera? this.iecompattest().scrollTop : window.pageYOffset
var windowedge=this.ie && !window.opera? this.iecompattest().scrollTop+this.iecompattest().clientHeight-15 : window.pageYOffset+window.innerHeight-18
this.dropmenuobj.contentmeasure=this.dropmenuobj.offsetHeight
if (windowedge-this.dropmenuobj.y < this.dropmenuobj.contentmeasure){ //move up?
edgeoffset=this.dropmenuobj.contentmeasure+obj.offsetHeight
if ((this.dropmenuobj.y-topedge)<this.dropmenuobj.contentmeasure) //up no good either?
edgeoffset=this.dropmenuobj.y+obj.offsetHeight-topedge
}
}
return edgeoffset
},

dropit:function(obj, e, dropmenuID){
if (this.dropmenuobj!=null) //hide previous menu
this.dropmenuobj.style.visibility="hidden"
this.clearhidemenu()
if (this.ie||this.firefox){
obj.onmouseout=function(){cssdropdown.delayhidemenu()}
this.dropmenuobj=document.getElementById(dropmenuID)
this.dropmenuobj.onmouseover=function(){cssdropdown.clearhidemenu()}
this.dropmenuobj.onmouseout=function(){cssdropdown.dynamichide(e)}
this.dropmenuobj.onclick=function(){cssdropdown.delayhidemenu()}
this.showhide(this.dropmenuobj.style, e, "visible", "hidden")
this.dropmenuobj.x=this.getposOffset(obj, "left")
this.dropmenuobj.y=this.getposOffset(obj, "top")
this.dropmenuobj.style.left=this.dropmenuobj.x-this.clearbrowseredge(obj, "rightedge")+"px"
this.dropmenuobj.style.top=this.dropmenuobj.y-this.clearbrowseredge(obj, "bottomedge")+obj.offsetHeight+1+"px"
}
},

contains_firefox:function(a, b) {
while (b.parentNode)
if ((b = b.parentNode) == a)
return true;
return false;
},

dynamichide:function(e){
var evtobj=window.event? window.event : e
if (this.ie&&!this.dropmenuobj.contains(evtobj.toElement))
this.delayhidemenu()
else if (this.firefox&&e.currentTarget!= evtobj.relatedTarget&& !this.contains_firefox(evtobj.currentTarget, evtobj.relatedTarget))
this.delayhidemenu()
},

delayhidemenu:function(){
this.delayhide=setTimeout("cssdropdown.dropmenuobj.style.visibility='hidden'",this.disappeardelay)
},

clearhidemenu:function(){
if (this.delayhide!="undefined")
clearTimeout(this.delayhide)
}
}

function bookmarksite(title, url){
if (document.all)
window.external.AddFavorite(url, title);
else if (window.sidebar)
window.sidebar.addPanel(title, url, "")
}

function openwin(ver,window_name,x,y,id) {  // now includes hardcoded window name
		if (id) ver = ver + "?q=" + id;
		popWin = window.open(ver,window_name, 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width='+x+',height='+y+',align=center,screenX=100,screenY=100,left=20,top=20')
		popWin.focus()
}

function openwinimage(ver,window_name,x,y,id,session) {  // now includes hardcoded window name
		//window_name = 'win_' + ver.substring(0,4)
		if (id) ver = ver + "?id=" + id;
		if (session) ver = ver + "&PHPSESSID=" + session;
		popWin = window.open(ver,window_name, 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width='+x+',height='+y+',align=center,screenX=100,screenY=100,left=30,top=30')
		popWin.focus()
}