function imgRollover() {
	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('imgroll')!=-1){
					imgSrc[i]=imgarr[i].getAttribute('src');
					imgClass[i]=imgarr[i].className;
					imgPreload[i]=new Image();
					if (imgClass[i].match(/imgroll (\S+)/))	{
					imgPreload[i].src =	imgClass[i].match(/imgroll (\S+)/)[1]
					}
				imgarr[i].setAttribute('xsrc', imgSrc[i]);
				imgarr[i].onmouseover=function(){
				this.setAttribute('src',this.className.match(/imgroll (\S+)/)[1])
				}
				imgarr[i].onmouseout=function(){
				this.setAttribute('src',this.getAttribute('xsrc'))
			}
		}
	}
}
imgRollover();

function CalcTotal(txtInput, lblAddToNum, txtShow){
		cntAddToNum = document.getElementById(lblAddToNum);
		cntShow = document.getElementById(txtShow);
		
	if (!isNaN(parseInt(txtInput.value))){
		cntShow.value = (parseInt(txtInput.value)* cntAddToNum.innerHTML);
	} else {cntShow.value = '0.00';txtInput.value=''; }
}


function FreezeScreen(msg) {
      scroll(0,0);
      var outerPane = document.getElementById('FreezePane');
      var innerPane = document.getElementById('InnerFreezePane');
      if (outerPane) outerPane.className = 'FreezePaneOn';
      if (innerPane) innerPane.innerHTML = msg;
   }
   
function openLink(url){
  if (url.indexOf(BaseUrl) >= 0){
	window.location = url;
  }else{
	var newWin = window.open(url, '_blank');
	newWin.focus();}
}

function OpenImgWin(strImgUrl) {
 var r, re;                    
 var ss = strImgUrl
 re = /ImageTemp/g;             
 r = ss.replace(re, "Owners Images");    
 
var imgWin = window.open('','_ImgWin','status=no,toolbar=no,menubar=no,location=no'); 
  imgWin.document.open(); 
  imgWin.document.write('<HTML><BODY leftMargin="0" topMargin="0" ONLOAD="window.resizeTo(document.images[0].width, document.images[0].height + 30);"><input type="button" value="Close Window" onclick="self.close();" style="position:absolute;z-index:1000;"><IMG SRC="'+ r +'"><\/BODY><\/HTML>'); 
  imgWin.document.close();
  imgWin.focus(); 
}

// MJD Croope La France - 6.30.05
		function ValidateAlpha(eSymOnCodes) {
		
		// This validation code is disabled until a later date. 11.03.05 - (Need requiremnets on validation rules by field) MJD.
		
			var keyCode = event.keyCode;  
			var shiftKey = event.shiftKey;
			var ctrlKey = event.ctrlKey;
			var altKey = event.altKey;
			
			//alert(keyCode)
		
			var isValid = false;
			// Allow every key combination with the ctrl key or the alt key
			if (ctrlKey || altKey) {
				return true;}
			
			switch (true) {
				// Handle the case of shift-0 through shift-9
				case (shiftKey && keyCode >= 48 && keyCode <= 57):
				// Disallow all symbol character keys on the keyboard.
				case (keyCode >= 106 && keyCode <= 107):	// '*' and '+' (respectively) on the number pad
				case (keyCode >= 109 && keyCode <= 111):	// '-', '.', and '/' (respectively) on the number pad
				case (keyCode >= 186 && keyCode <= 189):	// ';', '=', ',', '-', '.', '/', and '~' (respectively) on the keyboard
				case (keyCode >= 191 && keyCode <= 192):	//Allow .
				case (keyCode >= 219 && keyCode <= 222):	// '[', '\', ']', and '"' (respectively) on the keyboard
					isValid = false;
					break;		
				// Allow all other keys on the keyboard, including navigation, shift, ctrl, alt, function, ..., etc. keys.
				default:
					isValid = true;
					break;		
			}
				
			if (eSymOnCodes && (shiftKey && eSymOnCodes.indexOf(keyCode) > -1 || eSymOnCodes.indexOf(keyCode) > -1)){isValid = true;}
			return isValid;
			
			return true;
		}
		
	function DisableOption(control) 
		{ 
		var formObj = document.all[control];
		var fldObj = formObj.getElementsByTagName('INPUT'); 
		
		for (i=0;i<fldObj.length;i++) 
		{if (fldObj[i].type == 'radio') {  
			fldObj[i].disabled = true; }}} 
			
	function CheckFloat(srcElement){
	if (srcElement.value.length == 1 && srcElement.value == '.') {srcElement.value = '';}
	}

	function ValidateInteger(isFloat) {
	
			var keyCode = event.keyCode;  
			var shiftKey = event.shiftKey;
			var ctrlKey = event.ctrlKey;
			var altKey = event.altKey;
			
			//alert(keyCode)
			
			var isValid = false;
			// Allow every key combination with the ctrl key or the alt key
			if (ctrlKey || altKey) {
				return true;}
				
			switch (true) {
				// Handle the case of shift-0 through shift-9
				case (shiftKey && keyCode >= 48 && keyCode <= 57):
				// Disallow all character keys on the keyboard.
				case (keyCode >= 65 && keyCode <= 90):	// A - Z on the keyboard
				case (keyCode >= 106 && keyCode <= 107):	// '*' and '+' (respectively) on the number pad
				case (keyCode >= 109 && keyCode <= 111):	// '-', '.', and '/' (respectively) on the number pad
				case (keyCode >= 186 && keyCode <= 192):	// ';', '=', ',', '-', '.', '/', and '~' (respectively) on the keyboard
				case (keyCode >= 219 && keyCode <= 222):	// '[', '\', ']', and '"' (respectively) on the keyboard
					isValid = false;
					break;		
				// Allow all other keys on the keyboard, including navigation, shift, ctrl, alt, function, ..., etc. keys.
				default:
					isValid = true;
					break;		
			}
			//alert(isFloat + '  ' +  keyCode)
			if ((isFloat && keyCode == 190) || (isFloat && keyCode == 110) || (isFloat && keyCode == 189) || (isFloat && keyCode == 109)) {isValid = true;}
			if (((isFloat && keyCode == 190) || (isFloat && keyCode == 110)) && (event.srcElement.value.indexOf('.') > -1)) {isValid = false;}
		
			//alert(isValid)
		
			return isValid;
		}	
		
		function PrintThisDiv(id) {
			var HTMLContent = document.getElementById(id);
			var Popup = window.open('about:blank', id, 'scrollbars=yes, resizable=yes, width=800, height=600');

			Popup.document.writeln('<html><head>');
			Popup.document.writeln('<style type="text/css">');
			Popup.document.writeln('body{font-family: Trebuchet MS;}');
			Popup.document.writeln('.no-print{display: none;}');
			Popup.document.writeln('</style>');
			Popup.document.writeln('</head><body>');
			Popup.document.writeln('<a href="javascript:;" onclick="window.print();">Click Here to Print</a>');
			Popup.document.writeln(HTMLContent.innerHTML);
			Popup.document.writeln('</body></html>');
			Popup.document.close();
			Popup.focus();
		}


