// Copyright CameoHD 2008
// CameoHD Placement Script 1.6a

setTimeout("writeObj()",1000);      

function init(){
    setIEStyle();
}


function setIEStyle(){
var Obj = document.getElementById('cameohd');
if(document.body.currentStyle['backgroundImage']=='none')
	{
		document.body.style.backgroundImage="url(http://www.cameohd.com/scripts/fixed.gif)";
		document.body.style.backgroundRepeat='no-repeat';
		document.body.style.backgroundAttachment='fixed';
	}
  if (navigator.appName =="Microsoft Internet Explorer" && navigator.userAgent.indexOf("Opera") < 0){ 
        Obj.style.setExpression('top','IE_Fixed()');
        } 
}

function IE_Fixed() {
        var Obj = document.getElementById('cameohd');
	var spot;
	var scrollTop;
	var clientHeight;
  if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) { 
    clientHeight  = document.documentElement.clientHeight;
  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {  
    clientHeight  = document.body.clientHeight;
  }
  if( document.body && ( document.body.scrollLeft || document.body.scrollTop ) ) {  
    scrollTop = document.body.scrollTop;
  } else if( document.documentElement && ( document.documentElement.scrollLeft || document.documentElement.scrollTop ) ) {
    scrollTop = document.documentElement.scrollTop;
  } else {scrollTop=0;}
	
        spot=scrollTop+clientHeight-Obj.clientHeight ;	
	
	return spot;
}

function closeIframe(){
    var Obj = document.getElementById('cameohd');
        document.body.removeChild(Obj);
}

function writeObj(){
    var position;
    if (navigator.appName =="Microsoft Internet Explorer" && navigator.userAgent.indexOf("Opera") < 0){ 
        position = "absolute";
        } else {
        position = "fixed";
    }

var URL = 'http://www.cameohd.com/live/plastic_surgery_group/psg_singer.swf';
var Width = '528';
var Height = '296';

var CameoDiv = document.createElement('div');
    CameoDiv.id = "cameohd";
    CameoDiv.style.position = position;
    CameoDiv.style.zIndex = 999;
    CameoDiv.style.bottom = 0;
    CameoDiv.style.right = 0;

CameoHDStr = "<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000'";
CameoHDStr += "codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,19,0'";
CameoHDStr += "width='"+Width+"' height='"+Height+"'>";
CameoHDStr += "<param name='movie' value='"+URL+"' />";
CameoHDStr += "<param name='quality' value='high' />";
CameoHDStr += "<param name='menu' value='false' />";
CameoHDStr += "<param name='wmode' value='transparent' />";
CameoHDStr += "<param name='AllowScriptAccess' value='always' />";
CameoHDStr += "<embed src='"+URL+"' quality='high' wmode='transparent'"; 
CameoHDStr += "pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash'";
CameoHDStr += "width='"+Width+"' height='"+Height+"' menu='false' AllowScriptAccess='always'></embed></object>";

CameoDiv.innerHTML = CameoHDStr;

document.body.appendChild(CameoDiv);

        init();
}

