// JavaScript Document
if (typeof wthvideo == 'undefined') {
	wthvideo = new Object();
}
wthvideo.params = {
	width:304,
	height:304,
	left:"50%",
	right:"auto",
	//top:"489px",
	top:"614px",
	centeroffset:"145px",
	bottom:"auto",
	flv:"bradmartsoil2737"};

wthvideo.hideDiv = function(){
	document.getElementById('wthvideo').style.visibility = 'hidden';	
}
wthvideo.showDiv = function(){
	document.getElementById('wthvideo').style.visibility = 'visible';	
}

function onlyOnce() {
	if (document.cookie.indexOf("hasSeen=true") == -1) {
		var later = new Date();
		later.setTime(later.getTime()+(1*24*60*60*1000));
		//later.setTime(later.getTime()+(10*1000));
		var expires = "expires="+later.toGMTString();
		document.cookie = 'hasSeen=true;'+expires+';path=/;';
		wthvideo.showDiv();
	} else {
		wthvideo.hideDiv();
	}
}

function replayVideo() {
	wthvideo.showDiv();
	document.getElementById('talkinghead').replayVid();
}

wthvideo.drawVideo= function(){
	var markUp = '';
	markUp += '<style type="text/css">';
	markUp += '#wthvideo {position:absolute;width:'+wthvideo.params.width+'px;height:'+wthvideo.params.height+'px;margin-left:'+wthvideo.params.centeroffset+';left:'+wthvideo.params.left+';right:'+wthvideo.params.right+';top:'+wthvideo.params.top+';bottom:'+wthvideo.params.bottom+';z-index:1;}';
	markUp += '</style>';
	markUp += '<div id="wthvideo">';
	markUp += '  <object id="talkinghead" style="outline:none;" type="application/x-shockwave-flash" width="'+wthvideo.params.width+'" height="'+wthvideo.params.height+'" data="wthvideo/wthplayer.swf">';
	markUp += '    <param name="movie" value="wthvideo/wthplayer.swf" />';
	markUp += '    <param name="quality" value="high" />';
	markUp += '    <param name="flashvars" value="vurl='+wthvideo.params.flv+'.flv&amp;vwidth='+wthvideo.params.width+'&amp;vheight='+wthvideo.params.height+'" />';
	markUp += '    <param name="wmode" value="transparent" />';
	markUp += '    <param name="allowscriptaccess" value="always" />';
	markUp += '    <param name="swfversion" value="9.0.45.0" />';
	markUp += '  </object>';
	markUp += '</div>';
	document.write(markUp);
}
function hideDiv() {
	wthvideo.hideDiv();
}


wthvideo.drawVideo();
onlyOnce();