﻿function startAnim(pic,color) {
 pic.src='/images/arrow' + color + 'Anim.gif';
}

function stopAnim(pic,color) {
 pic.src='/images/arrow' + color + '.gif';
}

function setLayerPosition(dh, dw) {	
	var contentWidth = 602;
	var contentHeight = 363;
	if (document.all) {		
		// Explorer 6.0		
		var w = document.body.clientWidth;
		if(w>contentWidth) w = (w-contentWidth)/2; else w = 0;
		var h = document.body.clientHeight;
		if(h>contentHeight) h = (h-contentHeight)/2; else h = 0;
		document.all.container.style.top = dh+h;
		document.all.container.style.left = dw+w;
	} else if (document.getElementById) {	
		// Netscape 7.0		
		var w = document.documentElement.offsetWidth;
		if(w>contentWidth) w = (w-contentWidth)/2; else w = 0;
		var h = document.documentElement.offsetHeight;
		if(h>contentHeight) h = (h-contentHeight)/2; else h = 0;
		document.getElementById('container').style.top = dh+h;
		document.getElementById('container').style.left = dw+w;
	}
	setTimeout("setLayerPosition("+dh+","+dw+")",100);
}

function popup(url) {
 
 xPos = 0;
 yPos = 0;
 popupW = 780;
 popupH = 500;
 screenW = screen.width;
 screenH = screen.height;
 
 if(screenW < popupW)
 	popupW = screenW;
 else
 	xPos = (screenW - popupW)/2;
 
 if(screenH < popupH)
 	popupH = screenH;
 else
 	yPos = ((screenH - popupH)/2)-60;
	
	
 winProps = 'width=' + popupW + ',height=' + popupH + ',directories=yes,status=yes,scrollbars=auto,resizable=yes,menubar=yes,toolbar=yes'
 if (navigator.appName.indexOf("Microsoft")>=0)
  winProps+=',left=' + xPos + ',top=' + yPos
 else
  winProps+=',screenX=' + xPos + ',screenY=' + yPos 
 
 win = window.open(url,'win',winProps);
}