window.onload = function() {
	// get query string value (?id=x)
	//var currLocat = new String(location.search);
	// isolate x from ?id=x
	//var activeLink = 'a'+currLocat.match(/[0-9]/i);
	// grab it as an object
	//var activateIt = document.getElementById(activeLink);
 	
 	// highlight current link
 	//activateIt.style.color = '#fc0';
 	//activateIt.style.textDecoration = 'none';
}

function openWindowKitchen(url, label) {
	NewWindow=window.open("","anewwindow","resizable=1,location=0,directories=0,status=0,menubar=0,scrollbars=1,toolbar=0,width=600,height=500");
	NewWindow.document.write ("<html><head>");
	NewWindow.document.write ("<title>Williams Lumber</title>");
	NewWindow.document.write ("<link rel=stylesheet href='/fileadmin/template/main/WilliamsLumber_popup.css' type='text/css'>");
	NewWindow.document.write ("</head><body>");
	NewWindow.document.write ("<h1 align='center'>");
	NewWindow.document.write (label);
	NewWindow.document.write ("</h1>");
	NewWindow.document.write ("<p align='center'>");
	NewWindow.document.write ("<a href='javascript:this.close()'>Close Window</a></p>");
	NewWindow.document.write ("<p align='center'>");
	NewWindow.document.write ("<a href='javascript:this.close()'><img src=");
	NewWindow.document.write ("/"+url);
	NewWindow.document.write ("></a></p>");
	NewWindow.document.write ("</body></html>");
	NewWindow.document.close();
	return false;
}

function openWindowCooking(url) {
	NewWindow=window.open("","anewwindow","resizable=1,location=0,directories=0,status=0,menubar=0,scrollbars=1,toolbar=0,width=600,height=500");
	NewWindow.document.write ("<html><head>");
	NewWindow.document.write ("<title>Williams Lumber</title>");
	NewWindow.document.write ("<link rel=stylesheet href='/fileadmin/template/main/WilliamsLumber_popup.css' type='text/css'>");
	NewWindow.document.write ("</head><body>");
	NewWindow.document.write ("<h1 align='center'>");
	NewWindow.document.write ("Cooking with Chef Andrew Selz");
	NewWindow.document.write ("</h1>");
	NewWindow.document.write ("<p align='center'>");
	NewWindow.document.write ("<a href='javascript:this.close()'>Close Window</a></p>");
	NewWindow.document.write ("<p align='center'>");
	NewWindow.document.write ("<a href='javascript:this.close()'><img src=");
	NewWindow.document.write (url);
	NewWindow.document.write ("></a></p>");
	NewWindow.document.write ("<a href='demonstration.php' target='_blank'>Register</a> here"); 
	NewWindow.document.write ("&nbsp;to receive annoucements on upcoming cooking demonstrations and other events at Williams Lumber.");
	NewWindow.document.write ("</body></html>");
	NewWindow.document.close();
	return false;
}

function TVWindow(TVFileName) {
	NewWindow=window.open("","NewOne","resizable=1,location=0,directories=0,status=0,menubar=0,scrollbars=1,toolbar=0,width=500,height=400");
	NewWindow.document.write ("<html><head>");
	NewWindow.document.write ("<title>Williams Lumber</title>");
	NewWindow.document.write ("<link rel=stylesheet href='/fileadmin/template/main/WilliamsLumber_popup.css' type='text/css'>");
	NewWindow.document.write ("</head><body><div align='center'>");
	NewWindow.document.write ("<h1>Williams Lumber</h1><p>&nbsp;</p>");
	NewWindow.document.write ("<object width='288' height='260'>");
	NewWindow.document.write ("<param name='controller' value='false'>");
	NewWindow.document.write ("<param name='type' value='video/quicktime'>");
	NewWindow.document.write ("<param name='autoplay' value='true'>");
	NewWindow.document.write ("<param name='target' value='myself'>");
	NewWindow.document.write ("<param name='src' value='/fileadmin/user_upload/pressroom/");
	NewWindow.document.write (TVFileName);
	NewWindow.document.write ("'>");
	NewWindow.document.write ("<param name='href' value='/fileadmin/user_upload/pressroom/");
	NewWindow.document.write (TVFileName);
	NewWindow.document.write ("'>");
	NewWindow.document.write ("<param name='pluginspage' value='http://www.apple.com/quicktime/download/indext.html'>");
	NewWindow.document.write ("<embed width='288' height='260' controller='true' src='fileadmin/user_upload/pressroom/");
	NewWindow.document.write (TVFileName);
	NewWindow.document.write ("' type='video/quicktime' target='myself' border='0' pluginspage='http://www.apple.com/quicktime/download/indext.html'></embed>");
	NewWindow.document.write ("</object>");
	NewWindow.document.write ("<p><a href='JavaScript:this.close()'>Close Window</a></p>");
	NewWindow.document.write ("</div></body></html>");
	NewWindow.document.close();
	return false;
}
	
function TVWindow2(TVFileName) {
	NewWindow=window.open("","NewOne","resizable=1,location=0,directories=0,status=0,menubar=0,scrollbars=1,toolbar=0,width=500,height=400");
	NewWindow.document.write ("<html><head>");
	NewWindow.document.write ("<title>Williams Lumber</title>");
	NewWindow.document.write ("<link rel=stylesheet href='/fileadmin/template/main/WilliamsLumber	.css' type='text/css'>");
	NewWindow.document.write ("</head><body><div align='center'>");
	NewWindow.document.write ("<h1>Williams Lumber</h1><p>&nbsp;</p>");
	NewWindow.document.write ("<object width='448' height='262'>");
	NewWindow.document.write ("<param name='controller' value='false'>");
	NewWindow.document.write ("<param name='type' value='video/quicktime'>");
	NewWindow.document.write ("<param name='autoplay' value='true'>");
	NewWindow.document.write ("<param name='target' value='myself'>");
	NewWindow.document.write ("<param name='src' value='/fileadmin/user_upload/pressroom/");
	NewWindow.document.write (TVFileName);
	NewWindow.document.write ("'>");
	NewWindow.document.write ("<param name='href' value='/fileadmin/user_upload/pressroom/");
	NewWindow.document.write (TVFileName);
	NewWindow.document.write ("'>");
	NewWindow.document.write ("<param name='pluginspage' value='http://www.apple.com/quicktime/download/indext.html'>");
	NewWindow.document.write ("<embed width='448' height='262' controller='true' src='/fileadmin/user_upload/pressroom/");
	NewWindow.document.write (TVFileName);
	NewWindow.document.write ("' type='video/quicktime' target='myself' border='0' pluginspage='http://www.apple.com/quicktime/download/indext.html'></embed>");
	NewWindow.document.write ("</object>");
	NewWindow.document.write ("<p><a href='JavaScript:this.close()'>Close Window</a></p>");
	NewWindow.document.write ("</div></body></html>");
	NewWindow.document.close();
	return false;
}
