// Creates and controls Pac-Man Flash movie
var ofsx = -70;
var ofsy = 425;
var posx = ofsx;
function movePMS() {    posx+=5;
    var elem = document.getElementById("pms");
     if (!document.width) document.width=screen.width;
    if (posx<document.width+32 && posx<screen.width) {        elem.style.top = ofsy+"px";
        elem.style.left = posx+"px";
        elem.style.visibility="visible";
         window.setTimeout("movePMS()",25);
    } else {        posx=ofsx;
        elem.style.left = ofsx+"px";
        elem.style.visibility = "hidden";
        //window.setTimeout("movePMS()",2000);
    }
    //window.status=posx;
}
function createPMDiv2(site) {
    frag = node = document.createDocumentFragment();
    node = node.appendChild(document.createElement("div"));
    node.setAttribute("id","pms");
    node.setAttribute("style","position:absolute;visibility:hidden;top:"+ofsy+"px;left:"+ofsx+"px;background-color:transparent;width:64px;height:64px;z-index:10000;");
    obj = node = frag.appendChild(document.createElement("object"));
    node.setAttribute("classid","clsid:d27cdb6e-ae6d-11cf-96b8-444553540000");
    node.setAttribute("codebase","http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0");
    node.setAttribute("width","64");
    node.setAttribute("height","64");
    node.setAttribute("id","pmsurprise");
    node.setAttribute("align","left");
    alert("Yes, I am fully aware how badly Internet Explorer totally SUCKS!!!");
    parm = node = obj.appendChild(document.createElement("param"));
    node.setAttribute("name","allowScriptAccess");
    node.setAttribute("value","sameDomain");
    //alert("FUCK YOU INTERNET EXPLORER PIECE OF GOD DAMN USELESS SHIT!");
    //alert("FUCK YOU FUCK YOU FUCK YOU MICROSOFT ASSHOLE FUCKS!");
    //node = node.parentNode;
    //<param    parm = node = obj.appendChild(document.createElement("param"));
    node.setAttribute("name","movie");
    node.setAttribute("value",site+"pmsurprise.swf");
    //node = node.parentNode;
    //<param     parm = node = obj.appendChild(document.createElement("param"));
    node.setAttribute("name","quality");
    node.setAttribute("value","high");
    //node = node.parentNode;
    //<param     parm = node = obj.appendChild(document.createElement("param"));
    node.setAttribute("name","wmode");
    node.setAttribute("value","transparent");
    //node = node.parentNode;
    //<param     parm = node = obj.appendChild(document.createElement("param"));
    node.setAttribute("name","bgcolor");
    node.setAttribute("value","#0099ff");
    //node = node.parentNode;
    embed = node = obj.appendChild(document.createElement("embed"));
    node.setAttribute("src",site+"pmsurprise.swf");
    node.setAttribute("quality","high");
    node.setAttribute("wmode","transparent");
    node.setAttribute("bgcolor","#0099ff");
    node.setAttribute("width","64");
    node.setAttribute("height","64");
    node.setAttribute("name","pmsurprise");
    node.setAttribute("align","left");
    node.setAttribute("allowScriptAccess","sameDomain");
    node.setAttribute("type","application/x-shockwave-flash");
    node.setAttribute("pluginspage","http://www.macromedia.com/go/getflashplayer");
    //node = node.parentNode;
    // Back to Object
    //node = node.parentNode;
    // Back to Div
    //node = node.parentNode;
    // Back to Document Fragment void
    document.body.appendChild(frag);
}
function createPMDiv1(site) {
    var pmd = document.createElement("div");
    pmd.setAttribute("id","pms");
    pmd.setAttribute("style","position:absolute;visibility:hidden;top:"+ofsy+"px;left:"+ofsx+"px;background-color:transparent;width:64px;height:64px;z-index:10000;");
    var obj = document.createElement("object");
    obj.innerHTML = '<OBJECT id=pmsurprise height=64 width=64 align=left classid=clsid:d27cdb6e-ae6d-11cf-96b8-444553540000 codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0"><PARAM NAME="allowScriptAccess" VALUE="sameDomain"><PARAM NAME="movie" VALUE="'+site+'pmsurprise.swf"><PARAM NAME="quality" VALUE="high"><PARAM NAME="wmode" VALUE="transparent"><PARAM NAME="bgcolor" VALUE="#0099ff"><PARAM NAME="_cx" VALUE="5080"><PARAM NAME="_cy" VALUE="5080"><PARAM NAME="FlashVars" VALUE=""><PARAM NAME="Src" VALUE=""><PARAM NAME="Play" VALUE="-1"><PARAM NAME="Loop" VALUE="-1"><PARAM NAME="SAlign" VALUE=""><PARAM NAME="Menu" VALUE="-1"><PARAM NAME="Base" VALUE=""><PARAM NAME="Scale" VALUE="ShowAll"><PARAM NAME="DeviceFont" VALUE="0"><PARAM NAME="EmbedMovie" VALUE="0"><PARAM NAME="SWRemote" VALUE=""><PARAM NAME="MovieData" VALUE=""><PARAM NAME="SeamlessTabbing" VALUE="1"></OBJECT>';
    /*    // object     obj.setAttribute("classid","clsid:d27cdb6e-ae6d-11cf-96b8-444553540000");
    obj.setAttribute("codebase","http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0");
    obj.setAttribute("width","64");
    obj.setAttribute("height","64");
    obj.setAttribute("id","pmsurprise");
    obj.setAttribute("align","left");
    // param     var param = document.createElement("param");
    param.setAttribute("name","allowScriptAccess");
    param.setAttribute("value","sameDomain");
    obj.appendChild(param);
    // param    param = document.createElement("param");
    param.setAttribute("name","movie");
    param.setAttribute("value",site+"pmsurprise.swf");
    obj.appendChild(param);
    // param     param = document.createElement("param");
    param.setAttribute("name","quality");
    param.setAttribute("value","high");
    obj.appendChild(param);
    // param     param = document.createElement("param");
    param.setAttribute("name","wmode");
    param.setAttribute("value","transparent");
    obj.appendChild(param);
    // param     param = document.createElement("param");
    param.setAttribute("name","bgcolor");
    param.setAttribute("value","#0099ff");
    obj.appendChild(param);
    */    /*    var elem = document.createElement("embed");
    elem.setAttribute("src",site+"pmsurprise.swf");
    elem.setAttribute("quality","high");
    elem.setAttribute("wmode","transparent");
    elem.setAttribute("bgcolor","#0099ff");
    elem.setAttribute("width","64");
    elem.setAttribute("height","64");
    elem.setAttribute("name","pmsurprise");
    elem.setAttribute("align","left");
    elem.setAttribute("allowScriptAccess","sameDomain");
    elem.setAttribute("type","application/x-shockwave-flash");
    elem.setAttribute("pluginspage","http://www.macromedia.com/go/getflashplayer");
    obj.appendChild(elem);
    */    pmd.appendChild(obj);
    //bod = document.getElementsByTagName("body")[0];
    //dpms = document.getElementById("pms");
    //dpms.innerHTML = pmd.innerHTML;
    //bod.replaceChild(dpms,pmd);
    document.body.appendChild(pmd);
    //document.write(pmd.outerHTML);
}
function createPMDiv3(site) {    var dpms = document.getElementById("pms");
    //dpms.outerHTML = '<div id="pms" style="position:absolute;visibility:hidden;top:"+ofsy+"px;left:"+ofsx+"px;background-color:transparent;width:64px;height:64px;z-index:10000;">';
    if (browser=="IE") {        dpms.innerHTML = '<OBJECT id=pmsurprise height=64 width=64 align=left classid=clsid:d27cdb6e-ae6d-11cf-96b8-444553540000 codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0"><PARAM NAME="allowScriptAccess" VALUE="sameDomain"><PARAM NAME="movie" VALUE="'+site+'pmsurprise.swf"><PARAM NAME="quality" VALUE="high"><PARAM NAME="wmode" VALUE="transparent"><PARAM NAME="bgcolor" VALUE="#0099ff"><PARAM NAME="_cx" VALUE="5080"><PARAM NAME="_cy" VALUE="5080"><PARAM NAME="FlashVars" VALUE=""><PARAM NAME="Src" VALUE=""><PARAM NAME="Play" VALUE="-1"><PARAM NAME="Loop" VALUE="-1"><PARAM NAME="SAlign" VALUE=""><PARAM NAME="Menu" VALUE="-1"><PARAM NAME="Base" VALUE=""><PARAM NAME="Scale" VALUE="ShowAll"><PARAM NAME="DeviceFont" VALUE="0"><PARAM NAME="EmbedMovie" VALUE="0"><PARAM NAME="SWRemote" VALUE=""><PARAM NAME="MovieData" VALUE=""><PARAM NAME="SeamlessTabbing" VALUE="1"></OBJECT>';
    } else {        dpms.innerHTML = '<EMBED src="http://www.codesmart.com/blog/pmsurprise.swf" quality="high" wmode="transparent" bgcolor="#0099ff" width="64" height="64" name="pmsurprise" align="left" allowscriptaccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"></EMBED>';
        dpms.style.zIndex="10000";
    }}function initialize(sec) {    var site = "http://www.codesmart.com/blog/";
    createPMDiv3(site);
     window.setTimeout('movePMS()',1000*sec);
}