var newwindow;
function hitFlashResizeH(flashId,size){
	
}
function loadInTopWindow() {
//if (window.parent.meframe.index) {
//    window.parent.location="/";
//}
}
function poptastic(url)
{
    newwindow=window.open(url,'window','scrollbars=yes,height=600,width=930');
    if (window.focus) {
        newwindow.focus()
    }
}
function poptasticGames(url)
{
    newwindow=window.open(url,'name','scrollbars=no,height=600,width=800');
    if (window.focus) {
        newwindow.focus()
    }
}
function popSlipShow_slip(url)
{
    newwindow=window.open(url, 'slip', 'scrollbars=yes,width=650,height=500'); 
    if (window.focus) {
        newwindow.focus()
    }
}
function popSlipShow(url)
{
    newwindow=window.open(url,'slip','height=500,width=350,scrollbars=yes');
    if (window.focus) {
        newwindow.focus()
    }
}
function StasticLOGOUT()
{
    eval('parent'+".location='log_out.jsp'");
//if (restore) selObj.selectedIndex=0;
}
function StasticGotoUrl(url)
{
    eval('parent'+".location='"+url+"'");
//if (restore) selObj.selectedIndex=0;
}
function setFlashHeight(v, newH){
    flash_co_me(v,newH);
}
function setRFlashHeight(newH){
    document.getElementById('me_slip').style.height = newH+"px";
//document.getElementById('flashcontent2').style.height = newH+"px";
}
function setRSCommingLiveBetList(newH){
    document.getElementById('me_Comming_LiveBetList_div').style.height = newH+"px";
//document.getElementById('flashlivebetList').style.height = newH+"px";
}
function setRSLiveBetList(newH){
    document.getElementById('me_LiveBetList_div').style.height = newH+"px";
//document.getElementById('flashlivebetList').style.height = newH+"px";
}
function setRSLiveSupport(newH){
    document.getElementById('me_live_support').style.height = newH+"px";
//document.getElementById('flashcontent00').style.height = newH+"px";
}
/*function calcHeightFrame()
{
    var the_height=document.getElementById('meframe').contentWindow.document.body.scrollHeight;
    document.getElementById('meframe').height=the_height;
}*/
function setiframeHeight(hh)
{
    document.getElementById('meframe').height=hh;
}

function LeftMenuGoto(url)
{
    var iframe = document.getElementById('meframe');
    iframe.src = url;
}
function Show_server_message(){
    
}

/*var xmlHttp

function showHint(str)
{
    if (str.length==0)
    { 
        document.getElementById("moh_credit").innerHTML="";
        return;
    }
    xmlHttp=GetXmlHttpObject();
    if (xmlHttp==null)
    {
        alert ("Your browser does not support AJAX!");
        return;
    } 
    var url="gethint.asp";
    url=url+"?q="+str;
    url=url+"&sid="+Math.random();
    xmlHttp.onreadystatechange=stateChanged;
    xmlHttp.open("GET",url,true);
    xmlHttp.send(null);
} */

function stateChanged() 
{ 
    if (xmlHttp.readyState==4)
    { 
        document.getElementById("moh_credit").innerHTML=xmlHttp.responseText;
    }
}

/*function GetXmlHttpObject()
{
    var xmlHttp=null;
    try
    {
        // Firefox, Opera 8.0+, Safari
        xmlHttp=new XMLHttpRequest();
    }
    catch (e)
    {
        // Internet Explorer
        try
        {
            xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
        }
        catch (e)
        {
            xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
        }
    }
    return xmlHttp;
}
*/
function resizeIFrameNow(iframeWindow)
{
    resizeIFrame(iframeWindow);
    this.betSlipLoaded = true;
}
function changeParentUrl(url){

    document.location=url;
}

function  getMessageNoCookie(c_name)
{
    var me="";
    if (document.cookie.length>0)
    {
        c_start=document.cookie.indexOf(c_name + "=");
        if (c_start!=-1)
        {
            c_start=c_start + c_name.length+1;
            c_end=document.cookie.indexOf(";",c_start);
            if (c_end==-1) c_end=document.cookie.length;
            me= unescape(document.cookie.substring(c_start,c_end)) ;
        }        
    }
    return me;
//document.getElementById('moh_inboxNo').innerHTML = (me=="0"||me==""?"":"<span  style=cursor:pointer;  onclick=LeftMenuGoto(\"myaccount.jsp?account=5&finance=0\")  >inbox("+me+") <img src='images/inbox/msg.gif' ></span>");
}
function killCookie(aaaaa){
    var kill_time = new Date("January 1, 1970");
    var kill_string = aaaaa+"=;expires=" + kill_time.toGMTString();
    document.cookie = kill_string;
}
function getMovieName(movieName) {
    if (navigator.appName.indexOf("Microsoft") != -1){
        return window[movieName];
    }else {
        return document[movieName];
    }
}

function processMainFrame(url) {
    mainFrameDiv.innerHTML="Loading...." ;

    if (window.XMLHttpRequest) { // Non-IE browsers
        req = new XMLHttpRequest();
        req.onreadystatechange = mainFrameDiv;
        try {
            req.open("GET", url, true);
        } catch (e) {
            alert(e);
        }
        req.send(null);
    } else if (window.ActiveXObject) { // IE
        req = new ActiveXObject("Microsoft.XMLHTTP");
        if (req) {
            req.onreadystatechange = mainFrameDiv;
            req.open("GET", url, true);
            req.send();

        }
    }
}

function mainFrameDiv() {
    if (req.readyState == 4) { // Complete
        if (req.status == 200) { // OK response
            document.getElementById('mainMeFrame').innerHTML = req.responseText;
            
        } else {
            alert("Problem: " + req.statusText);
        }
    }
}