﻿    // Permalinks option
    function flashPutHref(href) { location.href = href; }

    // Expand browser option
    var eB = false;
    if (eB) {
        window.moveTo(0, 0);
        window.resizeTo(screen.availWidth, screen.availHeight);
    }

    // swffit sizing
    var swf_pad = 0;
    function initSwffit(w, h) {
        // If you change name of the DIV the SWF is written at,
        // change 'flashcontent' to the name of your DIV.
        swffit.fit('flashcontent', w + swf_pad, h + swf_pad);
    }

    // SWFObject embed
    var flashvars = {}
    var params = {
        bgcolor: "#000000",
        allowfullscreen: "true",
        wmode : "transparent"

    }
    var attributes = {}
    swfobject.embedSWF("sachome_main.swf", "flashcontent", "100%", "100%", "9.0.0", "expressInstall.swf", flashvars, params, attributes);
    /* below required for google chrome embed issue */
    swffit.fit('flashcontent', 0, 0);

    //------------------narrower flashcontent panel----------------
//    swf_pad = 0;
//    function initSwffit(w, h) {
//        // If you change name of the DIV the SWF is written at,
//        // change 'flashcontent' to the name of your DIV.
//        swffit.fit('flashcontentnarrow', w + swf_pad, h + swf_pad);
//    }

//    attributes = {}
//    swfobject.embedSWF("sachome_main.swf", "flashcontentnarrow", "100%", "100%", "9.0.0", "expressInstall.swf", flashvars, params, attributes);
//    /* below required for google chrome embed issue */
//    swffit.fit('flashcontentnarrow', 0, 0);
    //---------------------------------------------------------------
    
    function getObj(name){
    if (document.getElementById){
        this.obj = document.getElementById(name);
        this.style = document.getElementById(name).style;
    }
    else if (document.all){
        this.obj = document.all[name];
        this.style = document.all[name].style;
    }
}

function getWinSize(){
   var iWidth = 0, iHeight = 0;

   if (document.documentElement && document.documentElement.clientHeight){
       iWidth = parseInt(window.innerWidth,10);
       iHeight = parseInt(window.innerHeight,10);
   }
   else if (document.body){
       iWidth = parseInt(document.body.offsetWidth,10);
       iHeight = parseInt(document.body.offsetHeight,10);
   }

   return {width:iWidth, height:iHeight};
}

function resize_id(obj) {
    var oContent = new getObj(obj);
    var oWinSize = getWinSize();
    var n = (oWinSize.height-110) - parseInt(oContent.obj.offsetTop, 0);
    if (n > 0)
        oContent.style.height = n.toString() + "px";
}

//window.onresize = function() { resize_id('frame1'); }

//
function getscrres() {
    //res = "&res=" + screen.width + "x" + screen.height + "&d=" + screen.colorDepth;
    if (screen.width > 1024)
        top.location.href = "Default_hd.aspx";
}


function preloader_() {


    // counter
    var i = 0;


    // create object
    imageObj = new Image();


    // set image list
    images = new Array();
    images[0] = "App_Themes/sac2010/images/frontmenusilk2.png"



    // start preloading
    for (i = 0; i <= 0; i++) {
        imageObj.src = images[i];
    }



} 
