function newWin(theURL,winName,features) { window.open(theURL,winName,features);}
function news(theURL){ window.open(theURL,'Quicksilver','scrollbars=yes,width=800,height=780');}
function Zoom(theImage,theTitle,x,y) {
	var x1 = x;	var y1 = y;	var newWindow = null;
	newWindow = window.open("","","width="+x1+",height="+y1+",scrollbars=yes,resizable=yes");
	if (newWindow !=null) {
		newWindow.focus();
		newimage = "<html><head><title>" +theTitle+ "</title><link href='stylesheets/default.css' rel='stylesheet' type='text/css'></head><body id='popup'><form><div align='center'><span>";
		if (theTitle == "Video"){
		thevideo = getUrlVars(theImage);		
		newimage += "<object width='640' height='380'><param name='movie' value='http://www.youtube.com/v/"+thevideo+"&rel=0&autoplay=1'></param><embed src='http://www.youtube.com/v/"+thevideo+"&rel=0&autoplay=1' type='application/x-shockwave-flash' width='640' height='380'></embed></object>";
			}else{newimage += "<img src='" +theImage+ " 'alt='" +theTitle+ "'>";}
		newimage += "</span><br><br><input type='button' value='Close window' onClick='javascript:window.close()'></form></div></body></html>";
	newWindow.document.write(newimage);
		newWindow.document.close();}
}
function getUrlVars(url)
{var vars = [], hash;var hashes = url.slice(url.indexOf('?') + 1).split('&');
for(var i = 0; i < hashes.length; i++){hash = hashes[i].split('=');vars.push(hash[0]);vars[hash[0]] = hash[1];} 
return vars['v'];}