
 // change the # on the left to adjuct the Y co-ordinate - main movie
	//replay button
	//close button
	
(document.getElementById) ? dom = true : dom = false;

function setCookie(name, value, expires, path, domain, secure) {
	var curCookie = name + "=" + escape(value) +
          ((expires) ? "; expires=" + expires.toGMTString() : "") +
          ((path) ? "; path=" + path : "") +
          ((domain) ? "; domain=" + domain : "") +
          ((secure) ? "; secure" : "");
		  
     document.cookie = curCookie;
}

function getCookie(name) {
     var dc = document.cookie;
     var prefix = name + "=";
     var begin = dc.indexOf("; " + prefix);
     if (begin == -1) {
          begin = dc.indexOf(prefix);
          if (begin != 0) return null;
     } else
          begin += 2;
     var end = document.cookie.indexOf(";", begin);
     if (end == -1)
          end = dc.length;
     return unescape(dc.substring(begin + prefix.length, end));
}

function deleteCookie(name, path, domain) {
     if (getCookie(name)) {
          document.cookie = name + "=" +
          ((path) ? "; path=" + path : "") +
          ((domain) ? "; domain=" + domain : "") +
          "; expires=Thu, 01-Jan-70 00:00:01 GMT";
     }
}


function showMovie(clip,t,w,h) {
	
	var t;
	var IEcode;
	
	if (navigator.appName == "Microsoft Internet Explorer") {
		
		IEcode = "classid=clsid:D27CDB6E-AE6D-11cf-96B8-444553540000 codebase=http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0/";
	}
	
   var obj = "<object data=\"http://muddinteractive.com/streamvideo/penskeauto/FlowPlayer.swf\" id=\"spokesperson\" height=\"" + h + "\" width=\"" + w + "\" align=\"center bottom\"" + IEcode + "><PARAM NAME=\"movie\" VALUE=\"http://muddinteractive.com/streamvideo/penskeauto/FlowPlayer.swf\"><PARAM NAME=\"quality\" VALUE=\"autohigh\"><PARAM NAME=\"salign\" VALUE=\"b\"><PARAM NAME=\"wmode\" VALUE=\"transparent\"><param name=\"flashvars\" value=\"config={videoFile: '" + clip + "', hideControls: true, autoPlay: true, loop: false}\" /></object>";  

	document.getElementById("layer1").innerHTML = obj;
	setTimeout("showThis('close')",500);
	setTimeout("closeMovie()",t);
	setTimeout("hideThis('close')",t);
	//setTimeout("hideThis('link')",t);
	setTimeout("hideThis('layer1')",t);

}

function closeMovie() {
	document.getElementById("layer1").innerHTML = '';
}

function hideThis(element) {
  	if (dom) {document.getElementById(element).style.visibility='hidden';}
  	if (document.layers) {document.layers[element].visibility='hide';} 
}
  
function showThis(element) {
  	if (dom) {document.getElementById(element).style.visibility='visible';}
  	if (document.layers) {document.layers[element].visibility='show';} 
}  

function placeIt() {
  
    //link positioning - removed
    //close button positioning

  	window.setTimeout("placeIt()", 10); 
}

window.onload=placeIt;
onResize="window.location.href = window.location.href"

