//=================================================================================
//	101Smart Ltd - SmartWebb
//  (c) 2006 101Smart Ltd
//	http://www.101ltd.com
//=================================================================================

// Determine browser.
isMinNS6 = (navigator.appName.indexOf("Netscape") >= 0 && parseFloat(navigator.appVersion) >= 5) ? 1 : 0;
isMinNS4 = (navigator.appName.indexOf("Netscape") >= 0 && parseFloat(navigator.appVersion) >= 4 && parseFloat(navigator.appVersion) < 5) ? 1 : 0;
isMinIE4 = ((document.all) && !isMinNS6) ? 1 : 0;
isMinIE5 = (isMinIE4 && navigator.appVersion.indexOf("5.") >= 0) ? 1 : 0;

var objWnd = null;

//-----------------------------------------------------------------------------
// Standard functions.
//-----------------------------------------------------------------------------

function showPage(strURL, lngHeight, lngWidth)
{
	window.focus();
	if (!window.objWnd == null && !window.objWnd.closed)
	{
		window.objWnd.close();
	}
	// Load detail in a new window
	var lngWidthX = ((screen.width - lngWidth) / 2);
	var lngHeightY = ((screen.height - lngHeight) / 2);
	var strSettings = "left=" + lngWidthX + ",top=" + lngHeightY + ",resizable,height=" + lngHeight + ",width=" + lngWidth;
	// return opened window object
	window.objWnd = window.open(strURL, 's4_pop', strSettings);
	window.objWnd.focus();
	return window.objWnd;
}

function domRollover() {
	if (navigator.userAgent.match(/Opera (\S+)/)) {
		var operaVersion = parseInt(navigator.userAgent.match(/Opera (\S+)/)[1]);
	}
	if (!document.getElementById||operaVersion <7) return;
	var imgarr=document.getElementsByTagName('img');
	var imgPreload=new Array();
	var imgSrc=new Array();
	var imgClass=new Array();
	for (i=0;i<imgarr.length;i++){
		if (imgarr[i].className.indexOf('domroll')!=-1){
			imgSrc[i]=imgarr[i].getAttribute('src');
			imgClass[i]=imgarr[i].className;
			imgPreload[i]=new Image();
			if (imgClass[i].match(/domroll (\S+)/)) {
				imgPreload[i].src = imgClass[i].match(/domroll (\S+)/)[1]
			}
			imgarr[i].setAttribute('xsrc', imgSrc[i]);
			imgarr[i].onmouseover=function(){
				this.setAttribute('src',this.className.match(/domroll (\S+)/)[1])
			}
			imgarr[i].onmouseout=function(){
				this.setAttribute('src',this.getAttribute('xsrc'))
			}
		}
	}
}
domRollover();