var playerbox = function(url,width,height){
	try{

    var isFixed = function () {
      var isSupported = null;
      if (document.createElement) {
        var el = document.createElement('div');
        if (el && el.style) {
          el.style.width = '1px';
          el.style.height = '1px';
          el.style.position = 'fixed';
          el.style.top = '10px';
          var root = document.body;
          if (root && 
              root.appendChild && 
              root.removeChild) {
            root.appendChild(el);
            isSupported = (el.offsetTop === 10);
            root.removeChild(el);
          }
          el = null;
        }
      }
      return isSupported;
    };	
	
		var d = document;
		var b = d.createElement("div");
		var f = d.createElement("div");
		f.style.position = b.style.position = "absolute";//incase browser dont set fixed setting
		f.style.position = b.style.position = "fixed";
		f.style.padding = b.style.padding = "0";
		f.style.margin = b.style.margin = "0";
    f.style.display = b.style.display = "block";
    f.style.border = b.style.border = "none";
    f.style.float = b.style.float = "none";

		f.style.left = b.style.left = "0";
		f.style.top = b.style.top = "0";
		f.style.width = b.style.width="100%";
		f.style.height = b.style.height="100%";	
		if(!isFixed()){//if set fixed removed (<ie7)
  		f.style.position = b.style.position = "absolute";
	   	f.style.left = b.style.left = (self.pageXOffset || document.documentElement.scrollLeft || document.body.scrollLeft)+"px";
		  f.style.top = b.style.top = (self.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop)+"px";
		  
		}
		
		//document.title = document.title + ":" + isFixed() + ":"+ b.style.position + ":" + f.style.top + ":" + b.style.top;
		
		b.style.zIndex = "5000";
		f.style.zIndex = "5001";
		//b.style.backgroundColor = "#000";
		//b.style.MozOpacity = 0.8;
		//b.style.opacity = .80;
		//b.style.filter = "alpha(opacity=80)";
		//f.onclick = function(){d.body.removeChild(b);d.body.removeChild(f);};
		d.body.appendChild(b);
		d.body.appendChild(f);
		//div for centering horizontaly 752x443
		var c = d.createElement("div");
		c.style.display = "block";

		c.style.float = "none";

		c.style.width=width+"px";
		c.style.height=height+"px";
		c.style.margin="0";
		c.style.padding="5px";	
		c.style.marginTop="10%";
		c.style.marginLeft="auto";
		c.style.marginRight="auto";
		c.style.backgroundColor = "#000";
		c.style.textAlign="left";
		//c.style.MozOpacity = 0.8;
		//c.style.opacity = .80;
		//c.style.filter = "alpha(opacity=80)";
			
		var i = d.createElement("iframe");
		i.style.display = "block";
    i.style.border = "none";		
		i.style.float = "none";
		i.style.margin = "0";
		i.style.padding = "0";
		i.style.position = "relative";
		i.style.width="100%";
		i.style.height="100%";	
		i.style.border = "none";
		i.src=url;
		i.frameBorder="0";
		i.scrolling="no";
		
		var p = d.createElement("img");
		p.style.display = "block";
		p.style.border = "none";
		p.style.float = "none";
		p.style.clear = "both";
		p.style.zIndex="5002";
		p.style.width="30px";
		p.style.height="30px";
		p.style.margin = "0";
		p.style.padding = "0";		
		p.align="left";
		p.hspace="0";
		p.vspace="0";
		

		p.style.position = "relative";
		p.style.left= width + "px";
		p.style.top= "-" +height + "px";
		p.style.marginTop= "-15px";
		p.style.marginLeft= "-15px";
		p.style.cursor = b.style.cursor = "pointer";
		p.src="http://www.nowwidget.com/static/images/close.png";
		p.onclick = function(){d.body.removeChild(b);d.body.removeChild(f);};
		
		f.appendChild(c);
		c.appendChild(i);//?so we hide padding
		c.appendChild(p);
		
		c.style.setProperty("-webkit-box-shadow","0px 0px 50px #000000",null);
		c.style.setProperty("-moz-box-shadow","0px 0px 50px #000000",null);
		c.style.setProperty("box-shadow","0px 0px 50px #000000",null);
		c.style.setProperty("box-shadow","0px 0px 50px #000000",null);
		c.style.setProperty("-moz-border-radius","9px",null); 
		c.style.setProperty("-webkit-border-radius","9px",null);
		c.style.setProperty("border-radius","9px",null);
	}
	catch(e){}	
	
	
	return false;
}
