// JavaScript Document
function popUp(URL){ winpops=window.open(URL,"","width=200,height=112,left=100,top=100,status=0,scrollbars=0,resizable=1,menubar=0,location=0,toolbar=0")
}
function popUp2(URL){ winpops=window.open(URL,"","width=200,height=362,left=200,top=120,status=0,scrollbars=0,resizable=1,menubar=0,location=0,toolbar=0")
}
function popUpFavorite(URL){ winpops=window.open(URL,"","width=200,height=100,left=100,top=100,status=0,scrollbars=0,resizable=1,menubar=0,location=0,toolbar=0")
}
function popComments(URL){ winpops=window.open(URL,"","width=440,height=400,left=100,top=100,status=0,scrollbars=1,resizable=1,menubar=0,location=0,toolbar=0")
}
function popRecoverPassword(URL){ winpops=window.open(URL,"","width=440,height=200,left=100,top=100,status=0,scrollbars=0,resizable=1,menubar=0,location=0,toolbar=0")
}
function popReportGame(URL){ winpops=window.open(URL,"","width=250,height=425,left=100,top=100,status=0,scrollbars=0,resizable=1,menubar=0,location=0,toolbar=0")
}
function MM_jumpMenu(targ,selObj,restore){ eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'"); if (restore) selObj.selectedIndex=0;}
function confirmDeleteMessage()
{ var agree=confirm("Tem certeza que deseja apagar esta mensagem?"); if (agree)
return true ; else
return false ;}
function ajaxLoader(url,id)
{ if (document.getElementById) { var x = (window.ActiveXObject) ? new ActiveXObject("Microsoft.XMLHTTP") : new XMLHttpRequest();}
if (x)
{ x.onreadystatechange = function()
{ if (x.readyState == 4 && x.status == 200)
{ el = document.getElementById(id); el.innerHTML = x.responseText;}
}
x.open("GET", url, true); x.send(null);}
}
function MM_openBrWindow(theURL,winName,features) { window.open(theURL,winName,features);}
function cookie_create( name, value, days ) { if ( days ) { var date = new Date(); date.setTime( date.getTime() + ( days * 24 * 60 * 60 * 1000 ) ); var expires = "; expires=" + date.toGMTString();} else { var expires = "";}
document.cookie = name + "=" + value + expires +"; path=/";}
function cookie_read( name ) { var nameEQ = name + "="; var ca = document.cookie.split( ';' ); for( var i = 0; i < ca.length; i++ ) { var c = ca[i]; while ( c.charAt(0) == ' ' ) c = c.substring( 1, c.length ); if ( c.indexOf( nameEQ ) == 0 ) return c.substring( nameEQ.length, c.length );}
return "";}
function cookie_erase( name ) { createCookie( name, "", -1 );}
function corporate_open(url)
{ corprate_window = window.open (url,'corporate','top=50,left=200,menubar,toolbar,location,resizable,scrollbars,status,width=760,height=500').focus();}
function adDisply(game_id){ if (cookie_read("adCookie") == game_id) { show();}
else { display(); cookie_create("adCookie",game_id); var t=setTimeout("show()",15000);}
}
function show(){ document.getElementById('ad_container').style.display = 'none'; document.getElementById('game_container').style.display = '';}
var milisec=0; var seconds=10; function display(){ if (milisec<=0){ milisec=9
seconds-=1
}
if (seconds<=-1){ milisec=0
seconds+=1
}
else
milisec-=1
document.getElementById('ad_counter').innerHTML=seconds
setTimeout("display()",100)
}
var mInterval; function startProgressBar() { reset(); mInterval = setInterval("doProgress()",65);}
function reset() { document.getElementById("mask").style.left = "0px"; document.getElementById("mask").style.width = document.getElementById("mContainer").offsetWidth + "px"; document.getElementById("progressIndicator").style.zIndex = 10;}
function doProgress() { curWidth = parseInt(document.getElementById("mask").offsetWidth); curLeft = parseInt(document.getElementById("mask").offsetLeft); curWidth --; curLeft ++; if(curLeft ==201) { clearInterval(mInterval); document.getElementById("mask").style.display = "none"; return;}
document.getElementById("mask").style.left = curLeft + "px"; if(parseInt(document.getElementById("mask").offsetWidth)>10)document.getElementById("mask").style.width = curWidth + "px";}

