
function runFlash(width, height, src, align, name) {
  document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="//download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="' +width+ '" height="' +height+ '" align="' +align+ '" id="' +name+ '">\n');
  document.write('<param name="movie" value="' +src+ '" />\n');
  document.write('<param name="wmode" value="transparent" />\n');
  document.write('<param name="quality" value="high" />\n');
  document.write('<embed src="' +src+ '" quality="high" wmode="transparent" swliveconnect="true" name="' +name+ '" align="' +align+ '" pluginspage="//www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="' +width+ '" height="' +height+ '">\n');
  document.write('</embed>\n');
  document.write('</object>\n');

}


function Page_Init()
{
	var lu = document.getElementById("Login1_username");
	if(lu)
	{	
		if(lu.style.backgroundColor != "red")
			lu.focus();	
	}
}

function resetLogin()
{
	var u, p;
	u = document.getElementById("Login1_username");
	p = document.getElementById("Login1_password");
	if(u && u.style.backgroundColor == "red")
	{
		u.value = "";
		u.style.backgroundColor = "white";
	}
	if(p && p.style.backgroundColor == "red")
	{
		p.value = "";
		p.style.backgroundColor = "white";
	}
}

function tabNext(obj,event,len,next_field) {

	if (event == "up"){
		if (obj.value.length >= len){
			next_field.focus();
		}
	}
}

function onlyNumbers(e){
	var keynum;
	var keychar;
	var numcheck;

	if(window.event) // IE	
		keynum = e.keyCode;
	else if(e.which)// Netscape/Firefox/Opera
		keynum = e.which;
	keychar = String.fromCharCode(keynum);
	numcheck = /[\d\b]/;
	return numcheck.test(keychar);
}
	

function openPopWindow(urlStr, headerStr)
{
    window.open(urlStr,"StartFreshToday","height=650,width=700,toolbar=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes"); 
}



