﻿function demonetword(netword, target) 
{

    window.location = "demo.aspx?netword=" + netword + "&landpage=" + target

    window.moveTo(0, 0);
    //alert("TATEMENT" + screen.availHeight + " : " + screen.availWidth);
    if (document.all) {
        top.window.resizeTo(screen.availWidth, screen.availHeight);
        //alert("First IF Statement " + screen.availHeight + " : " + screen.availWidth);

    } else if (document.layers || document.getElementById) {
        if (window.outerHeight < screen.availHeight || window.outerWidth < screen.availWidth) {
            window.outerHeight = screen.availHeight;
            window.outerWidth = screen.availWidth;
            //alert("INSIDE IF STATEMENT" + screen.availHeight + " : " + screen.availWidth);

        } else {

            //alert("window.outerHeight < screen.availHeight");
        }
    } else {
        //alert("document check failed!");
    }

    
    var is_chrome = navigator.userAgent.toLowerCase().indexOf('chrome') > -1;

    if (is_chrome) {
        top.window.resizeBy(screen.availWidth, screen.availHeight);
    } else {
        top.window.resizeTo(screen.availWidth, screen.availHeight);
    }


    return true;

}





// for someone who has big screen, Set the window size to 1024px..
function backtoHome(url) {

    
    
    top.window.location = url;

    if (screen.availWidth > 1024) {

        if (document.all) {
            top.window.resizeTo(1024, screen.availHeight);

        } else if (document.layers || document.getElementById) {
            
            top.window.outerWidth = 1024;
            top.window.outerHeight = screen.availHeight;
        }

        top.window.resizeTo(1024, screen.availHeight);

  
        var is_chrome = navigator.userAgent.toLowerCase().indexOf('chrome') > -1;

        // For Chrome ... trying to move and resize... ????
        if (is_chrome) {    
            var intValue = parseInt(((screen.availWidth - 1024) / 2).toString());
            top.window.resizeBy(1024, screen.availHeight);
            top.window.moveTo(intValue, 0);

        } else {        // THIS IS Same, but for Safari.. to make sure it moves and resizes...

            var intValue = parseInt(((screen.availWidth - 1024) / 2).toString());
            top.window.resizeTo(1024, screen.availHeight);

            top.window.moveTo(intValue, 0);
        }

    }

    
        
    return true;
}

