// Copyright 2010 BetterAntiVirus.com 
// JavaScript Document
if (typeof v1d == 'undefined') {
	v1d = new Object();
}
v1d.params = {
	width:256,
	height:384,
	position:"fixed",
	doctype:"strict",
	left:"50%",
	right:"auto",
	top:"auto",
	bottom:"0px",
	centeroffset:"-128px",
	color:0xCCCCCC,
	volume:70,
	autostart:"yes",
	controlbar:"yes",
	fadein:1,
	fadeout:2,
	flip:"no",
	delay:0,
	delayclose:0,
	buffertime:3,
	playbtn:"PlayVideo.png",
	playposition:"right",
	playtop:"bottom",
	exitoncomplete:"yes",
	oncepersession:"yes",
	vidlink:"no",
	openin:"_blank",
	path:"http://www.betterantivirus.com/v1d",
	actorpic:"jedbetterantivirus1569.png",
	flv:"jedbetterantivirus1561.flv"
};

var topPx = parseFloat(v1d.params.top);
var bottomPx = parseFloat(v1d.params.bottom);

v1d.hideDiv = function(){
	document.getElementById('v1d').style.visibility = 'hidden';	
}
function onlyOnce() {
if (document.cookie.indexOf("hasSeen=true") == -1) {
var later = new Date();
later.setFullYear(later.getFullYear()+10);
document.cookie = 'hasSeen=true;path=/;';
v1d.drawVideo();
}
}

v1d.drawVideo= function(){
	var markUp = '';
	markUp += '<style type="text/css">';
	markUp += '#v1d {position:'+v1d.params.position+';width:'+v1d.params.width+'px;height:'+v1d.params.height+'px;margin-left:'+v1d.params.centeroffset+';left:'+v1d.params.left+';right:'+v1d.params.right+';top:'+v1d.params.top+';bottom:'+v1d.params.bottom+';z-index:99999;}';
	markUp += '</style>';
	markUp += '<div id="v1d">';
	markUp += '  <object id="objvideo" style="outline:none;" type="application/x-shockwave-flash" width="'+v1d.params.width+'" height="'+v1d.params.height+'" data="'+v1d.params.path+'/wthplayer.swf">';
	markUp += '    <param name="movie" value="'+v1d.params.path+'/wthplayer.swf" />';
	markUp += '    <param name="quality" value="high" />';
	markUp += '    <param name="flashvars" value="vurl='+v1d.params.flv+'&amp;vwidth='+v1d.params.width+'&amp;vheight='+v1d.params.height+'&amp;actorpic='+v1d.params.path+'/'+v1d.params.actorpic+'&amp;autostart='+v1d.params.autostart+'&amp;exitoncomplete='+v1d.params.exitoncomplete+'&amp;vbuff='+v1d.params.buffertime+'&amp;vdelay='+v1d.params.delay+'&amp;vcolor='+v1d.params.color+'&amp;vlink='+v1d.params.vidlink+'&amp;openin='+v1d.params.openin+'&amp;delayclose='+v1d.params.delayclose+'&amp;fadein='+v1d.params.fadein+'&amp;fadeout='+v1d.params.fadeout+'&amp;vvol='+v1d.params.volume+'&amp;playbtn='+v1d.params.path+'/'+v1d.params.playbtn+'&amp;playpos='+v1d.params.playposition+'&amp;playtop='+v1d.params.playtop+'&amp;hflip='+v1d.params.flip+'&amp;controlbar='+v1d.params.controlbar+'" />';
	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>';
	if (v1d.params.position == "fixed") {
		if (v1d.params.doctype == "quirks") {
			if (v1d.params.top == "auto") {
						markUp += '<!--[if IE]>';
						markUp += '<style type="text/css">';
						markUp += '#v1d {position:absolute; top: expression(offsetParent.scrollTop - 1 + (offsetParent.clientHeight-this.clientHeight) + '+bottomPx+' + "px")}';
						markUp += '</style>';
						markUp += '<![endif]-->';}
					else {
							markUp += '<!--[if IE]>';
							markUp += '<style type="text/css">';
							markUp += '#v1d {position: absolute !important;top: expression(((document.documentElement.scrollTop || document.body.scrollTop) + (!this.offsetHeight && 0)) + '+topPx+' + "px")';
							markUp += '</style>';
							markUp += '<![endif]-->';}
					}
				else {
						markUp += '<!--[if lte IE 6]>';
						markUp += '<style type="text/css">';
						markUp += 'html, body{height: 100%;overflow: auto;}#v1d {position: absolute;}';
						markUp += '</style>';
						markUp += '<![endif]-->';
			}
		}		
	document.write(markUp);
}
function hideDiv() {
	v1d.hideDiv();
}

if (v1d.params.autostart=="oncethenpic") {
	if (document.cookie.indexOf("hasSeen=true") == -1) {
		var later = new Date();
		later.setFullYear(later.getFullYear()+10);
		document.cookie = 'hasSeen=true;path=/;';
		v1d.params.autostart = "yes";
		}
	else {
		v1d.params.autostart = "no";

	}
}

if (v1d.params.autostart=="oncethenmute") {
	if (document.cookie.indexOf("hasSeen=true") == -1) {
		var later = new Date();
		later.setFullYear(later.getFullYear()+10);
		document.cookie = 'hasSeen=true;path=/;';
		v1d.params.autostart = "yes";
		}
	else {
		v1d.params.autostart = "mute";
	}
}

if (v1d.params.oncepersession == "yes") {
	onlyOnce();}
	else {
		v1d.drawVideo();
	}

function thisMovie(movieName) {
         if (navigator.appName.indexOf("Microsoft") != -1) {
             return window[movieName];
         } else {
             return document[movieName];
         }
     }

	 
