﻿/// <reference path="jquery-1.3.2.min.js" />
// <reference path="jquery-1.3.2-vsdoc2.js" />

$(document).ready(function() {
    //set this div height so the content will   
    //stay aligned correctly in safari and opera
    //$("#leftContent").height(300);

    //set the main div height so that the vertical 
    //lines will extend all the way down the page
    if ($("#main").height() < ($(window).height() - 19))
        $("#main").height($(window).height() - 19);
    $(window).resize(function() {
        if ($("#main").height() < ($(window).height() - 19))
            $("#main").height($(window).height() - 19);
    });

    if (document.getElementById("ctl00_hfMenu") != null) {
        $("#img" + document.getElementById("ctl00_hfMenu").value).attr("src",
        "/uploadedimages/Home/" + document.getElementById("ctl00_hfMenu").value + ".gif");
        $("#img" + document.getElementById("ctl00_hfMenu").value).removeAttr("onmouseover");
        $("#img" + document.getElementById("ctl00_hfMenu").value).removeAttr("onmouseout");
    }

    //correct the left inner menu for opera and safari
    if ($.browser.opera || $.browser.safari ||
        ($.browser.msie && (jQuery.browser.version >= 8))) {
        $("#leftContent").find(".leftContentMenu").after("<br/>");
    }
});
    
function LoadAllImages()
{
    MM_preloadImages('/uploadedimages/Home/contact_roll.gif',
                '/images/careers_roll.gif', '/images/news_roll.gif', '/images/contact_roll.gif',
                '/images/search_roll.gif',
                '/uploadedimages/Home/about_roll.gif', '/uploadedimages/Home/difference_roll.gif',
                '/uploadedimages/Home/innovations_roll.gif', '/uploadedimages/Home/products_roll.gif',
                '/uploadedimages/Home/treatment_roll.gif', '/uploadedimages/Home/contributions_roll.gif',
                '/uploadedimages/Home/careers_roll.gif', '/uploadedimages/Home/news_roll.gif',
                '/uploadedimages/Home/contact_roll.gif');
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}