﻿/*use this to set div heights equal*/
function equalHeight()
{
    var content_1= document.getElementById('leftNav');
    var content_2 = document.getElementById('mainContent');
      
    if(content_1.offsetHeight > content_2.offsetHeight){
           content_2.style.height = content_1.offsetHeight + 'px';
           content_1.style.height = content_1.offsetHeight + 'px';
    }
    /*else
    {
           content_1.style.height = content_2.offsetHeight + 'px';
           content_2.style.height = content_2.offsetHeight + 'px';
    }*/
   // alert('leftNav = ' + content_1.style.height + '; pageContent = ' + content_2.style.height + '; nav = ');// + content_3.style.height)
  
  
  
}

/*this function for writing specific browser css*/
function browserSpecificCSS() {
    var agt=navigator.userAgent.toLowerCase();
    
    /*split the location
    if site is own domain (not a sub-folder of the domain, need to remove loc[3] from the cssLoc
    loc[0]=http:
    loc[1]=''
    loc[2]=domain (www.something.com)
    loc[3]=site folder
    */
    var loc = location.href.split("/");
    var cssLoc = loc[0] + '//' + loc[2] + '/' + loc[3]
    //for testing locally
    //cssLoc = ''
    if (agt.indexOf("opera") != -1){
        document.write('<link rel=stylesheet href="' + cssLoc + '/css/Opera.css">') 
    }
    /*
    if (agt.indexOf("firefox") != -1) {
        alert ("firefox")
    }*/
    
    if (agt.indexOf("safari") != -1){
        document.write('<link rel=stylesheet href="' + cssLoc + '/css/safari.css">') 
     //return 'Safari';
     }
    /*if (agt.indexOf("skipstone") != -1) return 'SkipStone';*/
    if (agt.indexOf("msie") != -1) {//return 'Internet Explorer';
        document.write('<link rel=stylesheet href="' + cssLoc + '/css/IE.css">') 
       // alert ("CSS Location: " + '<link rel=stylesheet href="' + cssLoc + '/css/IE.css">')
    }
    /*
    if (agt.indexOf("netscape") != -1) return 'Netscape';
    if (agt.indexOf("mozilla/5.0") != -1) return 'Mozilla';
    */
    
    
    /*var msg = ''
    for (i=0; i<= loc.length; i++){
        msg = msg + '<br>' + i + ': ' + loc[i];
    }*/
    //alert(cssLoc)
    
}