var printdocumentid = 0;

function printIt(){
	webmailplayer = open('/images/goldenglobes2005/felicityhuffman1.jpg','webmailplayer');
	webmailplayer.print('/images/goldenglobes2005/felicityhuffman1.jpg');
}

function showEditorial(id){
	window.open("/media/editorials/view.cfm?ss=1&id=" + id, "Editorial", "toolbar=no,directories=no,location=no,status=no,menubar=no,resizable=yes,copyhistory=no,scrollbars=yes,width=782,height=600");
}

function hideSnippet(){
	document.all.snippetwindow.style.visibility="hidden";
	document.all.photosnippetwindow.style.visibility="hidden";
}

function showSnippet(myID,xPos,yPos){
	if (document.all.snippetwindow.style.visibility == "visible"){
		alert("Please close existing snippet windows first.");
	}
	document.all.snippetwindow.style.visibility="visible";
	document.all.thesnippet.setAttribute("flashvars", "xPos=" + xPos + "&yPos=" + yPos + "&myID=" + myID);
}

function showPhotoSnippet(id){
	/*
	if (document.all.photosnippetwindow.style.visibility == "visible"){
		alert("Please close existing snippet windows first.");
	}
	*/
	document.all.photosnippetwindow.style.visibility="visible";
	document.all.thephotosnippet.setAttribute("flashvars", "&snippetId=" + id);
}


function showTimeline(){
	//window.open("/legend/timeline.cfm", "timeline", "toolbar=no,directories=no,location=no,status=no,menubar=no,resizable=no,copyhistory=no,scrollbars=no,width=782,height=432");
	window.open("/legend/leviancenturies/index.htm", "timeline", "toolbar=no,directories=no,location=no,status=no,menubar=no,resizable=no,copyhistory=no,scrollbars=no,width=782,height=600");
}

function showFlashPaper(paperid){
	document.getElementById('flashpaperwindow').style.visibility="hidden";
	document.getElementById('flashpaper').setAttribute("flashvars", "paperid=");
	document.getElementById('flashpaperwindow').style.visibility="visible";
	document.getElementById('flashpaper').setAttribute("flashvars", "paperid=" + paperid);
}

function printFlashPaper(){
	document.all.flashpaper2window.style.visibility="hidden";
	document.all.flashpaper2.setAttribute("flashvars", "paperid=");
	document.all.flashpaper2window.style.visibility="visible";
	document.all.flashpaper2.setAttribute("flashvars", "paperid=" + printdocumentid);
}


function showDigitalCanvas(canvasid){
	if(document.all.digitalcanvaswindow.style.visibility != "visible"){
		document.all.digitalcanvaswindow.style.visibility="visible";
		document.all.digitalcanvaswindow.setAttribute("flashvars", "canvasid=" + canvasid);
	}
}

function hideDigitalCanvas(){
	document.all.digitalcanvaswindow.style.visibility="hidden";
}

function hideFlashPaper(){
	document.all.flashpaperwindow.style.visibility="hidden";
}

function hideFlashPaper2(){
	document.all.flashpaper2window.style.visibility="hidden";
}

function googlemap(name, address1, address2, city, state, zip, phone){
	window.open("/mapit/?storename="+name+"&storeaddress1="+address1+"&storeaddress2="+address2+"&storecity="+city+"&storestate="+state+"&storezip="+zip+"&storephone="+phone, "googlemap","toolbar=no,directories=no,location=no,status=no,menubar=no,resizable=yes,copyhistory=no,scrollbars=yes,width=784,height=600");	
}

function mapIt(store, addr1, addr2, city, state, zip, tele){
	window.open("/findstores/mapit.cfm?store="+store+"&addr1="+addr1+"&addr2="+addr2+"&city="+city+"&state="+state+"&zip="+zip+"&tele="+tele, "storemap","toolbar=no,directories=no,location=no,status=no,menubar=no,resizable=no,copyhistory=no,scrollbars=no,width=500,height=400");	
}

function setId(printid){
	printdocumentid = printid;	
}

function showCanvas(sourcepath, printid){
	document.all.logoarea.style.visibility="hidden";
	document.getElementById("canvastable").style.background = "url(" + sourcepath + ")";
	printdocumentid = printid;
}


function showInline (elName) {
	var theElemenet = document.getElementById(elName);
	if (theElemenet) {
		theElemenet.style.display = "inline";
	}
}
function hideInline (elName) {
	var theElemenet = document.getElementById(elName);
	if (theElemenet) {
		theElemenet.style.display = "none";
	}
}
