function drawRect(left, top, width, height,val_opacity,pub,video) {
//top=document.getElementById('homeVideo').style.top;
//left=document.getElementById('homeVideo').style.left;
			if (document.createElement) {
						newdiv = document.createElement("div");
						newdiv.style.position="absolute";
						newdiv.style.width = width+"px";
						newdiv.style.height = height+"px";
						newdiv.style.backgroundColor = 'blue';
					
						nav=navigator.appName;
						if (nav=="Microsoft Internet Explorer"){
					   newdiv.style.filter='alpha(opacity=0)'; //IE
					  }
            else{
              newdiv.style.visibility = 'hidden';
            }
            
						newdiv.id = 'divrect';
						newdiv.innerHTML= pub;
						newdiv.style.opacity = val_opacity;
						document.getElementById('homeVideo').appendChild(newdiv);
			}
	   }
	   
	   
function show(id){
    eval("document.getElementById('"+id+"').style.display = 'block'");
    document.cookie = id + "=" + escape('block') + "; path=/";
}

function displaypub(){
    nav=navigator.appName;
    if (nav=="Microsoft Internet Explorer"){
       eval("document.getElementById('divrect').style.filter = 'alpha(opacity=100)'");
    }
    else{
      eval("document.getElementById('divrect').style.visibility = 'visible'");
    }
}

 function noad(){
 ChargeEmbed();
 }
 
 function endad(){
 ChargeEmbed();
 }
 

function hide(id){
    eval("document.getElementById('"+id+"').style.display = 'none'");
    eval("document.getElementById('divrect').style.display = 'none'");
    document.cookie = id + "=" + escape('none') + "; path=/";
}

function ChargeEmbed(){
    if($('#pub')){
        hide('pub');
        show('bgbc');
    }
}



