var gpBASEURL="http://statics.adpath.net/styles/blogparts/gamers/";
var gpBASEURLswf="http://game.adpath.net/blogparts/gamers/jugem/";
var gpSWFFILE="gamersparts.swf";
var gpFNAME="gamersparts";

gpInit();
gpFlashview();

function gpFlashview(){
var fheight="240";
var fwidth="160";

var br=gpBowserchk();

//parm edit
var parm = 'BASEURL='+gpBASEURLswf;
parm = parm+'&BR='+br;

var flshobj = '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="' + fwidth + '" height="' + fheight + '" id="'+gpFNAME+'" align="middle">';
flshobj = flshobj + '<param name="allowScriptAccess" value="always" />';
flshobj = flshobj + '<param name="WMODE" value="Transparent" />';
flshobj = flshobj + '<param name="movie" value="'+gpBASEURLswf+gpSWFFILE+'" /><param name="quality" value="high" /><param name="FlashVars" value="'+parm+'"><embed src="'+gpBASEURLswf+gpSWFFILE+'" quality="high" bgcolor="#FFFFFF" width="' + fwidth + '" height="' + fheight + '" name="'+gpFNAME+'" id="'+gpFNAME+'" align="middle" allowScriptAccess="always" WMODE="Transparent"  type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"  FlashVars="'+parm+'" swLiveConnect="true" />';
flshobj = flshobj + '</object>';
document.write(flshobj);
}

function gpInit(){
    document.write('<link href="'+gpBASEURL+'style.css" rel="stylesheet" type="text/css" />');
    document.write('<script src="http://game.adpath.net/ppvtracker?pid=IT032" type="text/javascript"></script>');
    document.write('<script language="javascript" type="text/javascript" src="http://statics.adpath.net/scripts/common/prototype.js"></script>');
    document.write('<script language="javascript" type="text/javascript" src="http://statics.adpath.net/scripts/common/window.js"></script>');
    document.write('<link rel="stylesheet" type="text/css" href="http://statics.adpath.net/styles/common/default.css" />');
    document.write('<link rel="stylesheet" type="text/css" href="http://statics.adpath.net/styles/common/alphacube.css" />');
    //document.write('<div style="background:White;opacity:0;" onclick="javascript:gpClose()" id="gpwall"></div>');
    //document.write('<div id="gpdisp"></div>');
}

function gamersparts_DoFSCommand(command, args) {
    if (command == "gamedisp") {
        gpDisplay(args);
    }
}

function gpDisplay(args){
    var wWidth = 570;
    var wHeight = 505;
    var iWidth = 520;
    var iHeight = 390;
    var marginTop = 20;
    var marginLeft = 33;
    var banner = '<div align=center><a href="http://game.adpath.net/path2nm?gid=82&amp;pid=IT032" target="_blank"><img src="http://images.adpath.net/game/gamers/pc/500_60_01.gif" width="500" height="60" /></a></div>';
    if (args.indexOf("cid=2")>=0 || args.indexOf("cid=8")>=0) {
        wWidth = 603;
        wHeight = 570;
        iWidth = 570;
        iHeight = 480;
        marginTop = 20;
        marginLeft = 16;
        banner = '<div align=center><a href="http://game.adpath.net/path2mg?gid=139&amp;pid=ADP019" target="_blank"><img src="http://images.adpath.net/game/real/mg/oni_468x60.gif" width="468" height="60" /></a></div>';
    }
    var content = banner+'<div style="margin-left:'+marginLeft+'px;margin-top:'+marginTop+'px;"><iframe src="' + args + '" frameborder="0" scrolling="auto" name="iframe01" id="iframe01" style="width:' +iWidth+ 'px; height:' +iHeight+ 'px;"></iframe></div>';
    
    var win = new Window({className: "alphacube", title: 'GO GAMERS!!', width:wWidth, height:wHeight, destroyOnClose: true, recenterAuto:true});
    win.getContent().update(content);
    win.showCenter();
}

function gpBowserchk(){
    if(window.opera){
        return "op";
    }
      else if(document.all){
        return "ie";
    }
      else if(document.layers||document.getElementById){
        return "ns";
    }
}
