function showProducts() {
	document.getElementById('productnav').style.zIndex = 5000;
	document.getElementById('productnav').style.display = 'block';
}
function hideProducts() {
	document.getElementById('productnav').style.zIndex = 90;
	document.getElementById('productnav').style.display = 'none';
}
		function clearUsername(){
			if (document.forms.loginform.username.value=='Username'){
				document.forms.loginform.username.value='';
				}
			}
		function clearPassword(){
			if (document.forms.loginform.pass.value=='Password'){
				document.forms.loginform.pass.value='';
				}
			}
			function DoShow(div){
			    obj = document.getElementById(div).style;
			    obj.display='block';
			}
			
			
			function DoHide(div){
			    obj = document.getElementById(div).style;
			    obj.display='none';
			}
			
			
			function DoShowVis(div){
			    obj = document.getElementById(div).style;
			    obj.visibility='visible';
			}
			function DoHideVis(div){
			    obj = document.getElementById(div).style;
			    obj.visibility='hidden';
			}
			
			
function entsub() {
  if (window.event && window.event.keyCode == 13){
    submitSearch();
    }
  else{
    return true;
    }
}


// http://bontragerconnection.com/ and http://willmaster.com/
// Version: July 28, 2007
var cX = 0; var cY = 0; var rX = 0; var rY = 0;
function UpdateCursorPosition(e){ cX = e.pageX; cY = e.pageY;}
function UpdateCursorPositionDocAll(e){ cX = event.clientX; cY = event.clientY;}
if(document.all) { document.onmousemove = UpdateCursorPositionDocAll; }
else { document.onmousemove = UpdateCursorPosition; }
function AssignPosition(d) {
if(self.pageYOffset) {
	rX = self.pageXOffset;
	rY = self.pageYOffset;
	}
else if(document.documentElement && document.documentElement.scrollTop) {
	rX = document.documentElement.scrollLeft;
	rY = document.documentElement.scrollTop;
	}
else if(document.body) {
	rX = document.body.scrollLeft;
	rY = document.body.scrollTop;
	}
if(document.all) {
	cX += rX; 
	cY += rY;
	}
//d.style.left = (cX+10) + "px";
//d.style.top = (cY+10) + "px";
d.style.left = (cX-25) + "px";
d.style.top = (cY-5) + "px";
}

function HideContent(d) {
if(d.length < 1) { return; }
document.getElementById(d).style.display = "none";
}
function ShowContent(d) {
if(d.length < 1) { return; }
var dd = document.getElementById(d);
	if (dd.style.display!="block"){
		AssignPosition(dd);
		dd.style.display = "block";
	}
}
function ReverseContentDisplay(d) {
if(d.length < 1) { return; }
var dd = document.getElementById(d);
AssignPosition(dd);
if(dd.style.display == "none") { dd.style.display = "block"; }
else { dd.style.display = "none"; }
}

$(document).ready(function () {
    getPosition();
});

function getPosition(){
	var jq = $('#productNavLoc');
	var position = jq.offset();
	//alert('x: ' + position.left + ', y: ' + position.top);
	AnotherObj = document.getElementById('productnav');
	AnotherObj.style.top  = (position.top - 5) + "px";
	AnotherObj.style.left = (position.left + 15) + "px";
	
	
	var jq2 = $('#popHelpLoc');
	var position2 = jq2.offset();
	//alert('x: ' + position.left + ', y: ' + position.top);
	AnotherObj2 = document.getElementById('popHelp');
	AnotherObj2.style.top  = (position2.top + 30) + "px";
	AnotherObj2.style.left = (position2.left - 130) + "px";
	
	var jq3 = $('#popVicLoc');
	var position3 = jq3.offset();
	//alert('x: ' + position.left + ', y: ' + position.top);
	AnotherObj3 = document.getElementById('popVic');
	AnotherObj3.style.top  = (position3.top + 25) + "px";
	AnotherObj3.style.left = (position3.left - 100) + "px";
}
//var bottomLeftPixelPosition = { left: position.left, top: position.top + jq.height() - 1; };


/*
var Target = document.getElementById('#productNavLoc');
var Pos = findPos(Target);

AnotherObj = document.getElementById('productnav');
AnotherObj .style.top  = Pos[1] + "px";
AnotherObj .style.left = Pos[0] + "px";
//------------------------------------
function findPos(obj) {
//----------------------------------------
    var curleft = curtop = 0;
    if (obj.offsetParent) {
    do {
    		curleft += obj.offsetLeft;
    		curtop += obj.offsetTop;
    } while (obj = obj.offsetParent);
    return [curleft,curtop];
    }
}

alert(Pos[1] + "px");
*/