function fFocusInput(PRobjSource)
{
	if(PRobjSource.readOnly) return;
	PRobjSource.style.backgroundColor="rgb(255,230,245)";
	PRobjSource.select();
}
function fBlurInput(PRobjSource)
{
	PRobjSource.style.backgroundColor="rgb(255,255,255)";
}


function fFocusDropBox(PRobjSource)
{
	PRobjSource.style.backgroundColor="rgb(255,230,245)";
}
function fBlurDropBox(PRobjSource)
{
	PRobjSource.style.backgroundColor="rgb(255,255,255)";
}


function fOverButton(PRobjSource)
{
	PRobjSource.style.backgroundColor="rgb(245,245,245)";
	PRobjSource.style.color="rgb(240,50,150)";
}
function fOutButton(PRobjSource)
{
	PRobjSource.style.backgroundColor="rgb(255,255,255)";
	PRobjSource.style.color="rgb(100,100,100)";
}

function fOverClientLeft(PRobjSource)
{
	fOverButton(PRobjSource);
	document.getElementById("GmrqClientele").scrollAmount=10;
	document.getElementById("GmrqClientele").direction="left";
}
function fOverClientRight(PRobjSource)
{
	fOverButton(PRobjSource);
	document.getElementById("GmrqClientele").scrollAmount=10;
	document.getElementById("GmrqClientele").direction="right";
}
function fOverClient()
{
	document.getElementById("GmrqClientele").scrollAmount=0;
}
function fOutClient(PRobjSource)
{
	if(PRobjSource)fOutButton(PRobjSource);
	document.getElementById("GmrqClientele").scrollAmount=3;
}

function fOverTopLinks(PVstrText)
{
	document.getElementById("GdivTopLinksText").style.left=fOffsetLeft(document.getElementById("GdivTopLinksImage"))+5;
	document.getElementById("GdivTopLinksText").innerHTML=PVstrText;
}
function fOutTopLinks()
{
	document.getElementById("GdivTopLinksText").innerHTML="";
}

function fShowAlert(PVstrMessage)
{
	alert(PVstrMessage);
}

function fShowConfirm(PVstrMessage)
{
	return confirm(PVstrMessage);
}

function fPrint()
{
	window.print();
}

function fShowDialog(PVstrPage)
{
	window.showModelessDialog(PVstrPage,"","dialogWidth:600px;dialogHeight:450px;");
}

function fOffsetLeft(PRobjSource)
{
	var LintCurrentLeft=0;
	if(PRobjSource.offsetParent) {
		while (PRobjSource.offsetParent) {
			LintCurrentLeft+=PRobjSource.offsetLeft;
			PRobjSource=PRobjSource.offsetParent;;
		}
	}
	else if(PRobjSource.x) {
		LintCurrentLeft+=PRobjSource.x;
	}
	return LintCurrentLeft;
}
function fOffsetTop(PRobjSource)
{
	var LintCurrentTop=0;
	if(PRobjSource.offsetParent) {
		while (PRobjSource.offsetParent) {
			LintCurrentTop+=PRobjSource.offsetTop;
			PRobjSource=PRobjSource.offsetParent;
		}
	}
	else if(PRobjSource.y) {
		LintCurrentTop+=PRobjSource.y;
	}
	return LintCurrentTop;
}

function fTrimString(PVstrSource)
{
	var LstrRetString=PVstrSource;
	while(LstrRetString.substring(0,1)==" ")LstrRetString = LstrRetString.substring(1, LstrRetString.length);
	while(LstrRetString.substring(LstrRetString.length-1,LstrRetString.length)==" ")LstrRetString = LstrRetString.substring(0,LstrRetString.length-1);
	return LstrRetString;
}

function fDetectBrowser()
{
	if(navigator.appName.indexOf("Microsoft")!=-1) return "IE";
	else if(navigator.appName.indexOf("Netscape")!=-1) return "FF";
	else return "IE";
}
function fAttachEvent(PRobjSource,PVstrEvent,PRobjFunction)
{
	if(fDetectBrowser()=="IE") {PRobjSource.attachEvent("on"+PVstrEvent,PRobjFunction);}
	else {PRobjSource.addEventListener(PVstrEvent,PRobjFunction,false);}
}
function fDetachEvent(PRobjSource,PVstrEvent,PRobjFunction)
{
	if(fDetectBrowser()=="IE") {PRobjSource.detachEvent("on"+PVstrEvent,PRobjFunction);}
	else {PRobjSource.removeEventListener(PVstrEvent,PRobjFunction,false);}
}
