function onKeyPressValidate(evt){
	var key;
	if(window.event){ // IE
		key = evt.keyCode;
	}else{ // FIREFOX
		key = evt.which;
	}
	if(key==13){
		return validatePID();
	}
}
function lockElements(){ 
	var winW = 630, winH = 460;
	if (parseInt(navigator.appVersion)>3) {
	 if (navigator.appName=="Netscape") {
	  winW = window.innerWidth-25;
	  winH = window.innerHeight+200;
	 }
	 if (navigator.appName.indexOf("Microsoft")!=-1) {
	  winW = document.body.offsetWidth;
	  winH = document.body.offsetHeight;
	 }
	}
	winH = winH +"px";
	winW =winW+"px";
	document.getElementById("backDiv").style.width = winW;
	document.getElementById("backDiv").style.height =winH;
	document.getElementById("backDiv").style.left = "0px";
	document.getElementById("backDiv").style.top = "0px";
	document.getElementById("backDiv").style.display = "block";
} 
function unLockElements(){  
if(document.getElementById("backDiv")!=null){
   document.getElementById("backDiv").style.display = "none";
   }
}

function showPIDblock(left, top)	{
	lockElements();
	document.getElementById("blockPIDValue").style.width = "450px";
	document.getElementById("blockPIDValue").style.left = (screen.width - 450) /2 + "px";
	//document.getElementById("blockPIDValue").style.left = "5px";
	//document.getElementById("blockPIDValue").style.top = "350px";
	document.getElementById("blockPIDValue").style.top = "200px";
	document.getElementById("blockPIDValue").style.display = "block";
	document.getElementById("deleteComments").focus();
}
function hidePIDblock()	{
    unLockElements();
	document.getElementById("blockPIDValue").style.display = "none";
}

function showAddPortfolio(left, top)	{
	lockElements();
	document.getElementById("msgId").style.display = "none";
	if(document.getElementById("portMsg")!=null){
		document.getElementById("portMsg").style.display = "none";
	}
	document.getElementById("addPortfolioID").style.width = "558px";
	document.getElementById("addPortfolioID").style.left = (screen.width - 450) /2 + "px";
	document.getElementById("addPortfolioID").style.top = "170px";
	document.getElementById("addPortfolioID").style.display = "block";
	if(document.addPortfolio!=null){
		document.addPortfolio.create.value='';
		document.addPortfolio.comments.value='';
		document.addPortfolio.portfolioSelect.disabled=false;
		document.addPortfolio.portfolioDescription.disabled=true;
		document.addPortfolio.portfolioName.disabled=true;
		document.addPortfolio.comments.focus();
	}
	//document.addPortfolio.portfolioSelect.value = globalPortSelect;
	
	displayPort();
}
function addLock(){ 
	
	var winW = 630, winH = 460;
	if (parseInt(navigator.appVersion)>3) {
	 if (navigator.appName=="Netscape") {
	  winW = window.innerWidth-20;
	  winH = window.innerHeight+200;
	  winH = "803";
	}
	 if (navigator.appName.indexOf("Microsoft")!=-1) {
	  winW = document.body.offsetWidth;
	  winH = document.body.offsetHeight;
	  winH = "1024";
	 }
	}
	winH = winH +"px";
	winW =winW+"px";
	document.getElementById("backDiv").style.width = winW;
	document.getElementById("backDiv").style.height =winH;
	document.getElementById("backDiv").style.left = "0px";
	document.getElementById("backDiv").style.top = "0px";
	document.getElementById("backDiv").style.display = "block";
}
function onloadShowAdd(left, top)	{
	addLock();
	//document.getElementById("portMsg").style.display = "none";
	document.getElementById("msgId").style.display = "none";
	document.getElementById("addPortfolioID").style.width = "558px";
	document.getElementById("addPortfolioID").style.left = (screen.width - 450) /2 + "px";
	document.getElementById("addPortfolioID").style.top = "170px";
	document.getElementById("addPortfolioID").style.display = "block";
	document.getElementById("portfolioSelect").focus();
}
function hideAddPortfolio()	{
    unLockElements();
	document.getElementById("addPortfolioID").style.display = "none";
}
function addLockPrice(){ 
	
	var winW = 630, winH = 460;
	if (parseInt(navigator.appVersion)>3) {
	 if (navigator.appName=="Netscape") {
	  winW = window.innerWidth-20;
	  winH = window.innerHeight+200;
	  winH = "550";
	}
	 if (navigator.appName.indexOf("Microsoft")!=-1) {
	  winW = document.body.offsetWidth;
	  winH = document.body.offsetHeight;
	  winH = "550";
	 }
	}
	winH = winH +"px";
	winW =winW+"px";
	document.getElementById("backDiv").style.width = winW;
	document.getElementById("backDiv").style.height =winH;
	document.getElementById("backDiv").style.left = "0px";
	document.getElementById("backDiv").style.top = "0px";
	document.getElementById("backDiv").style.display = "block";
}
function showChangePricingblock(left, top)	{
    //lockElements();
    addLockPrice();
	document.getElementById("changePricingId").style.width = "450px";
	document.getElementById("changePricingId").style.left = (screen.width - 450) /2 + "px";
	document.getElementById("changePricingId").style.top = "150px";
	document.getElementById("changePricingId").style.display = "block";
	
}
function hideChangePricingblock()	{
    unLockElements();
	document.getElementById("changePricingId").style.display = "none";
}

function validatePID(){
	return false;
}