
function popScreenshot(gCode,imgName, imgWidth, imgHeight)
{
	
    window.open("screenshot.aspx?code=" + gCode + "&src="+imgName, "screenshot", "toolbar=no, status=no, resize, width=" + imgWidth + ", height=" + imgHeight + " ")
    return
}

function popOnlineExt(gameUrl, gameCode, origin, width, height) {    
        window.open(gameUrl + "?code=" + gameCode + "&origin=" + origin, "online", "width=" + width + ", height=" + height);
        return;
}
function omnitureLogDownload(gameCode, omnitureChannel,gameName,catName,dlDateTime) {
try{
	omnitureLogDownload_Real(gameCode, omnitureChannel,gameName,catName,dlDateTime);
	}
	catch(e){}
}

function popPlayOnline(gCode, gWidth, gHeight){
	if (window != top)
		top.popPlayOnline(gCode, gWidth, gHeight);

	var oWidth, oHeight, oWindow
	oWidth = parseInt(gWidth) +80
	oHeight = parseInt(gHeight) - 250
	oWindow=window.open("/PlayOnline.aspx?code="+gCode,'null',"width=" + oWidth + ",Height=" + oHeight + ",status=no,toolbar=no,menubar=no,location=no,resizeable=yes")
	oWindow.focus()
}

function popPlayOnline2(gameUrl, gCode, gWidth, gHeight){
	if (window != top)
		top.popPlayOnline2(gameUrl, gCode, gWidth, gHeight)
		
	var oWidth, oHeight, oWindow
	oWidth = parseInt(gWidth) +80
	oHeight = parseInt(gHeight) - 250
	oWindow=window.open(gameUrl + "?code=" + gCode,'null',"width=" + oWidth + ",Height=" + oHeight + ",status=no,toolbar=no,menubar=no,location=no,resizeable=yes")
	oWindow.focus()
}

function sendOpenerToUrl(url){
	opener.location=url;
	opener.focus();
}

function resizeContentIFrame(srcEvent, newHeight)
{
	 try
	 {
		 if (newHeight == null)
			 newHeight = document.frames("ContentIFrame").document.body.scrollHeight + 20;
			 document.getElementById("ContentIFrameTable").height = newHeight;
	 }
	 catch(e) { }
}

function runApp(sku)
{
	objActiveX = document.getElementById('objActiveX');
    if(ODCinstalled==1) {
        objActiveX.launchGame(sku);
        self.location.reload()
    }
    return
}

function AlignHomePageCats(){
	var total=0
	row1 = new Array('CatTable_0','CatTable_1','CatTable_2')
	row2 = new Array('CatTable_3','CatTable_4','CatTable_5')
	row3 = new Array('CatTable_6','CatTable_7','CatTable_8')
	row  = new Array(row1,row2,row3)
	tempArr=null
	
	j=0
	do{
		i=0
		tempArr = new Array()
		do{
			divID=eval(row[j][i]+"LST.offsetHeight")
			tempArr[tempArr.length]=divID
			i++
		}while (i<3)
		
		rowMax=Math.max(tempArr[0],tempArr[1],tempArr[2])
		total = total + rowMax
		i=0
		do{
			gap=rowMax-tempArr[i]
			var oid = eval(row[j][i]+"Gap")
			oid.style.height=17+gap
			i++	
		}while (i<3)
		j++
	}while(j<3)
	
	//optional to align also the HOT GAMES column
	hotLST.style.height=total+190
}
