
//  -------------- handle popups on category and featured
var pcolor='#f0f0f0';
var ncolor='#fefefe';

function timeoff(val,s)
{
   // get specific div item, identified by node index
   var itm = document.getElementById(val);
   if (itm) {
   			if ( itm.style.backgroundColor!=pcolor ) {
					itm.style.backgroundColor=ncolor;
					itm.style.display="none";
				}
   	}
}

function on(val) {

   // get specific div item, identified by node index
   var itm = document.getElementById(val);
   if (itm) {
   		itm.style.backgroundColor=pcolor;
   		itm.style.display="block";
   	}
}

function off(val) {
   // get specific div item, identified by node index
   var itm = document.getElementById(val);
   setTimeout('timeoff('+val+',1)',2000);
   if (itm) {
    		itm.style.backgroundColor=ncolor;
   	}
}

function ondiv(val) {

   // get specific div item, identified by node index
   var itm = document.getElementById(val);
  
   if (itm) {
    		itm.style.backgroundColor=pcolor;
   	}
}

function offdiv(val) {
   // get specific div item, identified by node index
   var itm = document.getElementById(val);
   setTimeout('timeoff('+val+',2)',2000);
   
   //t=setTimeout('timeoff('+val+',2)',1000);
   if (itm) {
   		itm.style.backgroundColor=ncolor;
   }
}


// -------------  handle matching div heights
function matchHeight(){
	var cdiv, rdiv,ldiv, d;
	cdiv=document.getElementById('centerColumnWrapper2b');
	rdiv=document.getElementById('navColumnTwo');
	ldiv=document.getElementById('navColumnOne');
   // determine height for <div> element 

                if(cdiv.offsetHeight){ 

                     d=cdiv.offsetHeight; 

                } 

                else if(cdiv.style.pixelHeight){ 

                     d=cdiv.style.pixelHeight; 

                } 
       if (rdiv) rdiv.style.height=d+'px'; 
       if (ldiv) ldiv.style.height=d+'px'; 
                

}

// execute function when page loads

//window.onload=function(){

//     if(document.getElementsByTagName){

//          matchHeight();

//     }

//}

function popUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=610,height=610,left = 387.5,top = 95');");
}

