﻿// JScript File
var sContent="ctl00_cph_home_";
function set_main_side_block(iH)
{
   var dH = document.getElementById(sContent + "d_disp_newhome").offsetHeight; 
   if (iH>0) 
   {
       var hdn_S = parseInt(document.getElementById(sContent + "d_hdn_side").value);
       var hdn_M = parseInt(document.getElementById(sContent + "d_hdn_main").value);
       var hdn_H = parseInt(document.getElementById(sContent + "d_hdn_height").value);
       var uH = hdn_M -hdn_H+ dH;
       //-
       if (uH <hdn_S )  { uH=hdn_S; }
	    $("#tb-row").height(uH+30);
	    $("#container").height(uH+30);
	    $("#main-block").height(uH);
	    $("#side-block").height(uH);
    }
    else
    {
    	document.getElementById(sContent + "d_hdn_height").value = String(dH);
    }
}

function Open_Win_Popup(cURL) {
    var cGC = (Math.random()+1) * (Math.random()+1) ;
    var cwin = "G3_builder_"  + cGC ;
    cwin = cwin.replace('.','');
    cwin = cwin.replace(' ','');
    win_detail = window.open(cURL,cwin);//window.open(cURL,cwin,"toolbar=no,directories=no,menubar=no,location=no,scrollbars=yes,resizable=yes,top=0,left=0,width=750,height=550") ;
}

function Open_Win_Popup_860(cURL) {
   
    var cGC = (Math.random()+1) * (Math.random()+1) ;
    var cwin = "G3_builder_"  + cGC ;
    cwin = cwin.replace('.','');
    cwin = cwin.replace(' ','');
    win_detail = window.open(cURL,cwin);//window.open(cURL,cwin,"toolbar=no,directories=no,menubar=no,location=no,scrollbars=yes,resizable=no,top=20,left=20,width=860,height=550") ;
}
function Open_Win_Popup_PDF(cURL) {
   
    var cGC = (Math.random()+1) * (Math.random()+1) ;
    var cwin = "G3_builder_"  + cGC ;
    cwin = cwin.replace('.','');
    cwin = cwin.replace(' ','');
    win_detail = window.open(cURL,cwin,"toolbar=no,directories=no,menubar=no,location=no,scrollbars=yes,resizable=yes,top=20,left=20,width=770,height=550") ;
}
function bookmarkhome(url,title)
{
    if (window.sidebar)
    {
        window.sidebar.addPanel(title,url,"");
    }
    else if ( document.all)
    {
        window.external.AddFavorite(url,title);
    }
    else if (window.opera && window.print)
    {
        return true;
    }
}
