// JavaScript Document
<!--
function changePDF(file){
	//document.getElementById("container").childNodes[0].hidden = "true";
	var oldNode = document.getElementById("container").childNodes[0];
	//document.getElementById("container").removeChild(document.getElementById("container").childNodes[0]);
	var obj = document.createElement("EMBED");
	obj.width = "600";
	obj.height = "600";
	obj.hidden = "false";
	obj.src = file;
	document.getElementById("container").replaceChild(obj, oldNode);
}

function dt(){
	var d = new Date();
	var mdy = (d.getMonth()+1) + "/" + d.getDate() + "/" + d.getFullYear();
	var l = document.getElementById('dat');
	var tex = "Date: " + mdy;
	document.write(l.tex); 
}

function storeWin(local, city)
{
	//window.alert(top.frames[0].document.getElementById("testdiv").innerHTML);
	local = "ST0" + local;
	var citypage = "CPI/" + city;
	top.frames[0].location.href = citypage;
	var fu = "openWin2('" + local + "')";
	setTimeout(fu, 900);

}

function openWin(local, city)
{
	local = "ST0" + local;
	var citypage = "http://www.tuckercompanies.com/CPI/" + city + "#" + local;
	var winId = window.open(citypage,'Storewin','width=860,height=300,scrollbars=no,menubar=no,status=no,top=0,left=0,screenX=0,screenY=0');
	winId.document.close();
	winId.focus();
}

function openWin2(loc)
{
	var text = top.frames[0].document.getElementById(loc).cloneNode(true);
	var stylelink = "<link rel='stylesheet' type='text/css' href='siteWide.css' media='screen' />";
	var winId = window.open('','Storewin','width=60,height=300,scrollbars=no,top=0,left=0,screenX=0,screenY=0');
	var obj = document.createElement("TABLE");
	winId.document.close();
	winId.focus();
}

/*function showPwdReset()
{
	if(document.getElementById("pwdReset").style.display == "none")
		document.getElementById("pwdReset").style.display = "block";
	else
		document.getElementById("pwdReset").style.display = "none";
}*/

function showPwdReset()
{
	var a = document.getElementById("pwdLink");
	var b = document.myform.mybutton;
	var div = document.getElementById("pwdReset");
	var d = div.style.display;
	if(d == "none")
		b.onclick = function() {d = "display";};
	else 
		b.onclick = function() {d = "none";};
}

function writeIt(text)
{
	document.write(text);	
}
//-->
