var pageRoot = "";

function popWindow( url, width, height, windowName )
{
    //get center coords
    var left = (screen.width - width) / 2;
    var top = (screen.height - height) / 2;
    
    win=window.open(url, windowName, 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=' + width + ',height=' + height + ',left=' + left + ',top=' + top);
}

function popScrollingWindow(url, width, height, windowName)
{
    //get center coords
    var left = (screen.width - width) / 2;
    var top = (screen.height - height) / 2;
    
    win=window.open(url, windowName, 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width=' + width + ',height=' + height + ',left=' + left + ',top=' + top);
}

function openWindow(url)
{
    var rand = "_blank";
    win=window.open(url,rand,"directories=yes,location=yes,menubar=yes,scrollbars=yes,status=yes,toolbar=yes,resizable=yes");
}



function showWallpaper(number)
{
	popWindow(pageRoot + "./content/wallpapers/wallpaper.html?wid="+number+"&size=1024", 544, 589, "wallpapers");
}

function popIcons()
{
	popWindow("content/im_icons/index.html", 497, 550, "fkIcons");
}

function popPromotions(){
	popWindow("promotions/index.html", 560, 888, "fkPromo");
}



function launchGame(){
	popWindow("http://www.forbiddenkingdommovie.com/game/index.html", 640, 516, "fkGame");
}



function popFaceBookWidget(){
	popWindow("http://lionsgate.com/forbiddenkingdom/widget/", 300, 300, "fkWidget");
}

function popFacebookBattle(){
	openWindow("http://apps.facebook.com/nfightapp/home");
}

function popFacebookWidget(){
	openWindow("http://apps.facebook.com/forbiddenkingdom/home");
}






function popMyspaceWidget(){
	popWindow("http://lionsgate.com/forbiddenkingdom/widget/", 300, 300, "msWidget");
}

function popMyspaceGenerator(){
	popWindow("http://www.forbiddenkingdommovie.com/myspace/", 700, 564, "msGenerator");
}



function popTimeline(){
	popWindow("http://dev.forbiddenkingdommovie.com/timeline/", 800, 515, "fkTimeline");
}

