function mOvr(src,clrOver){
	if (!src.contains(event.fromElement)){ 
		src.style.cursor = 'hand'; 
		src.bgColor = clrOver; 
	} 
} 
function mOut(src,clrIn){ 
	if (!src.contains(event.toElement)){ 
		src.style.cursor = 'default'; 
		src.bgColor = clrIn; 
	}
} 
function mClk(src){ 
	if(event.srcElement.tagName=='TD')
		src.children.tags('A')[0].click();
}
function searchQuikPro(){
	if (document.frmSearchQuik.qp.value == '')
		alert('Please enter the QuikPro Number!');
	else
		document.frmSearchQuik.submit(); 
}
function openChangeWin(contentURL){
	newWindow = window.open(contentURL, null, 'height=336,width=380,status=no,toolbar=no,menubar=no,location=no,resizable=yes,scrollbars=yes');
	window.newWindow.focus();
}

function pop( pageName ) {
	 popup=open( "http://www.platinumvictory.com/" + pageName, "popup", "width=820,height=620,scrolling=yes,resizeable=no" );
	 clean=0;
}

//nereidFade
nereidFadeObjects = new Object();
nereidFadeTimers = new Object();

/* object - image to be faded (actual object, not name);
 * destop - destination transparency level (ie 80, for mostly solid)
 * rate   - time in milliseconds between trasparency changes (best under 100)
 * delta  - amount of change each time (ie 5, for 5% change in transparency)
 */

function nereidFade(object, destOp, rate, delta){
if (!document.all)
return
    if (object != "[object]"){  //do this so I can take a string too
        setTimeout("nereidFade("+object+","+destOp+","+rate+","+delta+")",0);
        return;
    }
        
    clearTimeout(nereidFadeTimers[object.sourceIndex]);
    
    diff = destOp-object.filters.alpha.opacity;
    direction = 1;
    if (object.filters.alpha.opacity > destOp){
        direction = -1;
    }
    delta=Math.min(direction*diff,delta);
    object.filters.alpha.opacity+=direction*delta;

    if (object.filters.alpha.opacity != destOp){
        nereidFadeObjects[object.sourceIndex]=object;
        nereidFadeTimers[object.sourceIndex]=setTimeout("nereidFade(nereidFadeObjects["+object.sourceIndex+"],"+destOp+","+rate+","+delta+")",rate);
    }
}

function enlargeimage(path, optWidth, optHeight){ //function to enlarge image. Change as desired.
var actualWidth=typeof optWidth!="undefined" ? optWidth : "600px" //set 600px to default width
var actualHeight=typeof optHeight!="undefined" ? optHeight : "500px" //set 500px to  default height
var winattributes="width="+actualWidth+",height="+actualHeight+",resizable=yes"
window.open(path,"", winattributes)
}

var DL_bNS4=(document.layers);
var DL_bNS6 = (navigator.vendor == ("Netscape6") || navigator.product == ("Gecko"));
var DL_bDOM=(document.getElementById);
var DL_bIE=(document.all);
var DL_bIE4=(DL_bIE && !DL_bDOM);
var DL_bMac = (navigator.appVersion.indexOf("Mac") != -1);
var DL_bIEMac=(DL_bIE && DL_bMac);
var DL_bIE4Mac=(DL_bIE4 && DL_bMac);
var DL_bNS =(DL_bNS4 || DL_bNS6);

function windowWidth() { 
	if (window.innerWidth != null){ return window.innerWidth; }    
	if (document.body.clientWidth != null) { return document.body.clientWidth;  }    
	return (0);    
}

function windowHeight() {
	if (window.innerHeight != null){ return window.innerHeight; }    
	if (document.body.clientHeight != null) { return document.body.clientHeight;  }    
	return (0);    
}

function objGetScreenLeft(oElement) 
{
	var  lA = window.screenY? window.screenY: window.screenTop;
	return objGetRealLeft(oElement) + lA; 
}

function findPosition( oLink ) {
	if( oLink.offsetParent ) {
		for( var posX = 0, posY = 0; oLink.offsetParent; oLink =
				oLink.offsetParent ) {
			posX += oLink.offsetLeft;
			posY += oLink.offsetTop;
		}
		this.x = posX;
		this.y = posY;
		return this;
	} else {
		this.x = oLink.x;
		this.y = oLink.y;
		return this;
	}
}
function objGetRealLeft(oElement)
{
	var nXPos = oElement.offsetLeft;
	var oParentEl = (DL_bIE4Mac) ? oElement.parentElement : oElement.offsetParent;

	while (oParentEl != null)
	{
		if(DL_bIE4Mac)
		{
			if(oParentEl.tagName=="SPAN")
			{
				oParentEl = oParentEl.parentElement;
			}
			if(oParentEl.tagName=="HTML")
			{
				break;
			}
		}

		nXPos += oParentEl.offsetLeft;
		oParentEl = (DL_bIE4Mac) ? oParentEl.parentElement : oParentEl.offsetParent;
	}
	return nXPos;

}


function objGetScreenTop(oElement) 
{
	var  tA = window.screenY? window.screenY: window.screenTop;
	return objGetRealTop(oElement) + tA; 
}
function objGetRealTop(oElement)
{
	var nYPos = oElement.offsetTop;
	var oParentEl = (DL_bIE4Mac) ? oElement.parentElement : oElement.offsetParent;
	while (oParentEl != null)
	{
		if(DL_bIE4Mac)
		{
			if(oParentEl.tagName=="SPAN")
			{
				oParentEl = oParentEl.parentElement;
			}
			if(oParentEl.tagName=="HTML")
			{
				break;
			}
		}
		nYPos += oParentEl.offsetTop;
		oParentEl = (DL_bIE4Mac) ? oParentEl.parentElement : oParentEl.offsetParent;
	}
	return nYPos;
}

function confirmSubmit()
{
var agree=confirm("Are you sure?");
if (agree)
	return true ;
else
	return false ;
}


