// general scripts //function openPage (thePage) {	if (opener) {		opener.location = thePage;	} else document.location = thePage;}function toggleProjects (showPast) {	if (showPast) {		document.getElementById('current_projects').style.display='none';		document.getElementById('past_projects').style.display='block';	} else {		document.getElementById('current_projects').style.display='block';		document.getElementById('past_projects').style.display='none';		}	return false;}// scripts for postcards //function showDesktop (theImage) {	if (theImage) {		desktopWindow = window.open("http://tenseforms.com/images/postcards/wallpaper_"+theImage,"desktop", "width=640,height=480,top=20,left=20,toolbar=no,location=no,status=no,directories=no");		desktopWindow.focus();		}	}// scripts for venues //// showVenue is deprecated! use openVenue instead //function showVenue (theVenue,theStyle) {	topCoord = 20;	leftCoord = 20;	if (theVenue) {		if (theStyle) {				venueWindow = window.open("http://tenseforms.com/venue.php?venue="+theVenue+"&style="+theStyle,"venue", "width=320,height=280,top="+			topCoord+",left="+leftCoord+",menubar=no,toolbar=no,location=no,status=no,directories=no");			venueWindow.focus();					} else {					venueWindow = window.open("http://tenseforms.com/venue.php?venue="+theVenue,"venue", "width=320,height=280,top="+			topCoord+",left="+leftCoord+",menubar=no,toolbar=no,location=no,status=no,directories=no");			venueWindow.focus();				}	}	}function openVenue (theUrl) {	topCoord  = (screen.height/2)-140;	leftCoord = (screen.width/2)-160;			venueWindow = window.open(theUrl,"venue", "width=320,height=280,top="+	topCoord+",left="+leftCoord+",menubar=no,toolbar=no,location=no,status=no,directories=no");	venueWindow.focus();	return false;	}// scripts for contact us form //function contactUs (theContact,theProject) {	topCoord  = (screen.height/2)-250;	leftCoord = (screen.width/2)-170;	listWindow = window.open("http://tenseforms.com/contact/","contact", 	"width=340,height=440,top="+topCoord+",left="+leftCoord+	",menubar=no,toolbar=no,location=no,status=no,directories=no,resizable=no,scrollbars");}function selectContact (theValue,theForm) {	theObject = document.getElementById("general");	if (theValue == "general") {		theObject.style.display = "block";	} else theObject.style.display = "none";	theObject = document.getElementById("booking");	if (theValue == "booking") {		theObject.style.display = "block";	} else theObject.style.display = "none";		theObject = document.getElementById("press");	if (theValue == "press") {		theObject.style.display = "block";	} else theObject.style.display = "none";	theObject = document.getElementById("submissions");	if (theValue == "submissions") {		theObject.style.display = "block";	} else theObject.style.display = "none";	theObject = document.getElementById("store");	if (theValue == "store") {		theObject.style.display = "block";	} else theObject.style.display = "none";	theObject = document.getElementById("site");	if (theValue == "site" || theValue == "bug") {		theObject.style.display = "block";	} else theObject.style.display = "none";}// scripts for mailing list form //function mailingList (theList) {	topCoord  = (screen.height/2)-270;	leftCoord = (screen.width/2)-230;	listWindow = window.open("http://tenseforms.com/list/?list="+theList,"list", "width=460,height=500,top="+topCoord+	",left="+leftCoord+",menubar=no,toolbar=no,location=no,status=no,directories=no,resizable=no,scrollbars");	}// StyleSwitcher functions written by Paul Sowden //// http://www.idontsmoke.co.uk/ss/                //// http://www.alistapart.com/stories/alternate/   //function setStyle (title) {	var i, a, main;	for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {		if(a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("title")) {			a.disabled = true;			if(a.getAttribute("title") == title) a.disabled = false;		}	}	return false;}function getStyle () {	var i, a;	for (i=0; (a = document.getElementsByTagName("link")[i]); i++) {		if (a.getAttribute("rel").indexOf("style") != -1 			&& a.getAttribute("title") 			&& !a.disabled			) return a.getAttribute("title");	}	return null;}function getPreferredStyle () {	var i, a;	for (i=0; (a = document.getElementsByTagName("link")[i]); i++) {		if (a.getAttribute("rel").indexOf("style") != -1			&& a.getAttribute("rel").indexOf("alt") == -1			&& a.getAttribute("title")			) return a.getAttribute("title");	}	return null;}function createCookie (name,value,days) {	if (days) {		var date = new Date();		date.setTime(date.getTime()+(days*24*60*60*1000));		var expires = "; expires="+date.toGMTString();	} else expires = "";	document.cookie = name+"="+value+expires+"; path=/; domain=.tenseforms.com";}function readCookie (name) {	var nameEQ = name + "=";	var ca = document.cookie.split(';');	for(var i=0;i < ca.length;i++) {		var c = ca[i];		while (c.charAt(0)==' ') c = c.substring(1,c.length);		if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);	}	return null;}window.onload = function (e) {	var cookie = readCookie("style");	var title = cookie ? cookie : getPreferredStyle();	setStyle(title);}window.onunload = function (e) {	var title = getStyle();	createCookie("style", title, 365);}var cookie = readCookie("style");var title = cookie ? cookie : getPreferredStyle();setStyle(title);
