﻿// set either to ten-net.net or balboainsurance.com domain, no subdomain
//http://support.microsoft.com/?scid=kb;en-us;823727&spid=2073&sid=global
SetDocDomain();
IE6ImageFlicker();
function SetDocDomain()  
{
    try  // catch error if domain is not ten-net.net or balboainsurance.com
    {
        var env_link = "balboainsurance.com";
        var url = window.location.href;

        //Work around for Access denied issue for IFrame
        //http://msdn.microsoft.com/en-us/library/ms533028(VS.85).aspx
        if(url.indexOf("ten-net.net") != -1)
           env_link = "ten-net.net";
                      
        document.domain = env_link;
      
    }
    catch(e){
    
    //alert('document.domain should be either ten-net.net or balboainsurance.com') 
    }
}
function IE6ImageFlicker()
{
    try 
    {
      document.execCommand("BackgroundImageCache", false, true);
    } 
    catch(err) {}
}

// TODO add following functions to HtmlContent app's balboascript.js file:
/*
    function ChangePageInPortal_ClaimSubmission()
    {
        var btnGotoClaimSubmissionPage = window.top.document.getElementById("btnGotoClaimSubmissionPage");
        btnGotoClaimSubmissionPage.click();
    }
    function ChangePageInPortal_SendEmail()
    {
        var btnGotoSendEmailPage = window.top.document.getElementById("btnGotoSendEmailPage");
        btnGotoSendEmailPage.click();
    }
*/