// *******  begin Javascript.Global.UserPortfolioOptions.js   ********

function ChangeUser(loc,passStr)
{

	URL = "Includes/Portfolio/tab.GetEmail.asp?passStr=" + passStr + "&loc="+loc;
			var x = 450;
			var y = 320;
			
			var thisWidth = x; // your window's width 
			var thisHeight = y; // your window's height 
			
			 if (document.all) {
        		var newScreenX = (screen.width - thisWidth) / 2;
				var newScreenY  = (screen.height - thisHeight) / 2;
    		} else {
        		if (document.layers) {
        			var newScreenX = (window.outerWidth - thisWidth) / 2;
					var newScreenY  = (window.outerHeight - thisHeight) / 2;
				} else {
        			var newScreenX = (800 - thisWidth) / 2;
					var newScreenY  = (600 - thisHeight) / 2;
				}
			}
	window.open(URL,"","width="+x+",height="+y+",top="+newScreenX+",left="+newScreenX+",resizable=yes");
}	
function ChangeUserSS(loc,passStr,saveSearch)
{
//savesearch need return back after getEmail

	if (saveSearch =='ss'){
		URL = "/Includes/Portfolio/tab.GetEmail.asp?passStr=" + passStr + "&loc="+loc + "&SaveSearchFlag=ss"; //added a parma to tell getEmail.asp where it came from --tony 7/25/05
	}else{
		URL = "/Includes/Portfolio/tab.GetEmail.asp?passStr=" + passStr + "&loc="+loc;
	}

		var x = 450;
		var y = 320;
		
		var thisWidth = x; // your window's width 
		var thisHeight = y; // your window's height 
		
	 if (document.all) {
       		var newScreenX = (screen.width - thisWidth) / 2;
				var newScreenY  = (screen.height - thisHeight) / 2;
	} else {
        		if (document.layers) {
        			var newScreenX = (window.outerWidth - thisWidth) / 2;
					var newScreenY  = (window.outerHeight - thisHeight) / 2;
				} else {
        			var newScreenX = (800 - thisWidth) / 2;
					var newScreenY  = (600 - thisHeight) / 2;
	}
			}
	window.open(URL,"","width="+x+",height="+y+",top="+newScreenX+",left="+newScreenX+",resizable=yes");
}	

function ChangeUserNew(loc,passStr,stocknum)
{
	if (stocknum.length > 0)
	{
//		URL = "/Includes/Portfolio/tab.GetEmail.asp?DLVin=" + stocknum + "&passStr=" + passStr + "&loc="+loc; 
		URL = "/Includes/Portfolio/tab.GetEmail.asp?DLVin=" + stocknum + "&passStr=" + passStr + "&loc="+loc + "&SaveSearchFlag=Z"; //added a parma to tell getEmail.asp where it came from --tony 7/25/05
	}else
	{
		URL = "/Includes/Portfolio/tab.GetEmail.asp?passStr=" + passStr + "&loc="+loc;
//		URL = "/Includes/Portfolio/tab.GetEmail.asp?passStr=" + passStr + "&loc="+loc + "&SaveSearchFlag=Y";
	}	
			var x = 450;
			var y = 320;
			
			var thisWidth = x; // your window's width 
			var thisHeight = y; // your window's height 
			
			 if (document.all) {
        		var newScreenX = (screen.width - thisWidth) / 2;
				var newScreenY  = (screen.height - thisHeight) / 2;
    		} else {
        		if (document.layers) {
        			var newScreenX = (window.outerWidth - thisWidth) / 2;
					var newScreenY  = (window.outerHeight - thisHeight) / 2;
				} else {
        			var newScreenX = (800 - thisWidth) / 2;
					var newScreenY  = (600 - thisHeight) / 2;
				}
			}
	window.open(URL,"","width="+x+",height="+y+",top="+newScreenX+",left="+newScreenX+",resizable=yes");
}	


function DeleteUser(loc)
{
	URL = "/Includes/Portfolio/tab.deleteuser.asp?HomePath=<%=HomePath%>&strTitle=<%=strTitle%>&loc="+loc;
			var x = 315;
			var y = 120;
			
			var thisWidth = x; // your window's width 
			var thisHeight = y; // your window's height 
			
			 if (document.all) {
        		var newScreenX = (screen.width - thisWidth) / 2;
				var newScreenY  = (screen.height - thisHeight) / 2;
    		} else {
        		if (document.layers) {
        			var newScreenX = (window.outerWidth - thisWidth) / 2;
					var newScreenY  = (window.outerHeight - thisHeight) / 2;
				} else {
        			var newScreenX = (800 - thisWidth) / 2;
					var newScreenY  = (300 - thisHeight) / 2;
				}
			}
	window.open(URL,"","width="+x+",height="+y+",top="+newScreenX+",left="+newScreenX+",resizable=yes");
}

function logout() {
	logoutwin = window.open('/Includes/Portfolio/logout.asp','lo','width=1,height=1');
}


function ShowHidePortfolio(what) {
		if (what == 0) {
			document.getElementById("MyPortfolioHeader").innerHTML = "<a href='javascript:ShowHidePortfolio(1);'><img src='/images/portfolio/my_portfolio_closed.gif' width='160' height='16' border='0'></a>";
			document.getElementById("MyPortfolioBody").className = "Dead";
			document.cookie = "ShowPortfolio=0";
		} else {
			document.getElementById("MyPortfolioHeader").innerHTML = "<a href='javascript:ShowHidePortfolio(0);'><img src='/images/portfolio/my_portfolio_open.gif' width='160' height='16' border='0'></a>";
			document.getElementById("MyPortfolioBody").className = "Live";
			document.cookie = "ShowPortfolio=1";
		}
}
// *******  begin Javascript.Global.UserPortfolioOptions.js   ********

