/* 
Script to compare heights of the sidebar and content divs, and set a right or
left border respectively on whichever div is the longest.

Result is to maintain a border down the right of sidebar until the end of
content or sidebar, whichever is longer.
*/

setColumnBorder=function(){ 
     var docP,docC,contentHeight,sidebarHeight;
     docP=document.getElementById("primary");
     docC=document.getElementById("content");
     // set sidebar right border default
     docP.style.borderRight="1px solid #CCD0D6"
     docC.style.borderLeft="0";
     // determine height for each element 
     if(docC.offsetHeight){ 
     	contentHeight=docC.offsetHeight;
     } 
     else if(docC.style.pixelHeight){ 
     	contentHeight=docC.style.pixelHeight; 
     }

    if(docP.offsetHeight){     
        sidebarHeight=docP.offsetHeight;   
     }           
     else if(docP.style.pixelHeight){     
	sidebarHeight=docP.style.pixelHeight;   
     } 
     
     // calculate shortest column
     if (Math.min(contentHeight,sidebarHeight)==sidebarHeight){
     	docC.style.borderLeft="1px solid #CCD0D6";
	docP.style.borderRight="0";
     }
     else{
	docP.style.borderRight="1px solid #CCD0D6";
	docC.style.borderLeft="0";
     }
}

setColumnBorderIE=function(){
     var docP,docC;
     docP=document.getElementById("primary");
     docC=document.getElementById("content");
     // set sidebar right border default
     docP.style.borderRight="1px solid #CCD0D6"
     docC.style.borderLeft="0";
}
