/* ************************************
 * Specific stuff for SwingTradeOnline.com stuff to work... 
 *
 * Jeff Kay
 * 04/15/2008
 *
 * ************************************ */
var changedEmail = false;
var changedPasswd = false;
function updateLoginForm(inputEle)
{
	if (inputEle.name == "email" && !changedEmail)
	{
		inputEle.value = "";
		changedEmail = true;
	}
	else if (inputEle.name == "password" & !changedPasswd)
	{
		// inputEle.type = "password";
		var frm = document.getElementById("loginForm");
		var nxt = inputEle.nextSibling;
		frm.removeChild(inputEle);
		var passwd_field = document.createElement("input");
		passwd_field.setAttribute("type", "password");
		passwd_field.setAttribute("size", "40");
		passwd_field.setAttribute("name", "password");
		frm.insertBefore(passwd_field, nxt);

		changedPasswd = true;
		var b = changedEmail;
		changedEmail = true;
		document.getElementById('loginForm').email.focus();
		passwd_field.focus();
		changedEmail = b;
	}
}

function openDetailStock(symbol)
{ 
	var w = 520;
	var h = 260;
	var winl = (screen.width - w) / 2;
	var wint = (screen.height - h) / 2;
	var winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=1';
	// win = window.open("http://app.quotemedia.com/quotetools/clientForward?targetURL=" + escape('http://app.quotemedia.com/quotetools/popups/quote.jsp') + "&cp=on&symbol=" + symbol, "DetailedQuote", winprops);
	win = window.open("http://app.quotemedia.com/quotetools/popups/quote.jsp?&cp=on&webmasterId=90649&symbol=" + escape(symbol), "DetailedQuote", winprops);

	if (parseInt(navigator.appVersion) >= 4)
		win.focus();
}
/*
function openDetailStock(symbol)
{ 
	var w = 520;
	var h = 260;
	var winl = (screen.width - w) / 2;
	var wint = (screen.height - h) / 2;
	var winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=1';
	win = window.open("http://app.quotemedia.com/quotetools/clientForward?targetURL=" + escape('http://app.quotemedia.com/quotetools/popups/quote.jsp') + "&cp=on&symbol=" + symbol, "DetailedQuote", winprops);

	if (parseInt(navigator.appVersion) >= 4)
		win.focus();
}
*/
function openSecurityCode()
    { window.open("/cc_security.php", "security", "height=620,width=680,status=yes,toolbar=no,menubar=no,location=no"); }
function openPerformance()
    { window.open("/services/performance_popup.php", "janperformance", "height=740,width=640,status=yes,toolbar=no,menubar=no,location=no,scrollbars=1"); }
function verifyRequired()
{
	if (document.icpsignup["fields_email"].value == "")
	{
		document.icpsignup["fields_email"].focus();
		alert("The Email field is required.");
		return false;
	}
	return true;
}

function openChatClient()
{
	newwindow = window.open('/members/chatclient.php','mywindow','width=634,height=476,resizable=1');
	if (newwindow.focus) { newwindow.focus() }
}
