//--- CSS time change ----------------------------------

/*function getCSS()
{
datetoday = new Date();
timenow=datetoday.getTime();
datetoday.setTime(timenow);
thehour = datetoday.getHours();

if (thehour > 20)
 display = "twilight.css";
  else if (thehour > 17)
 display = "sunset.css";
else if (thehour > 14)
 display = "afternoon.css";
else if (thehour > 11)
 display = "tree_noon.css";
else if (thehour > 7)
 display = "tree_morning.css";
else if (thehour > 4)
 display = "tree_sunrise.css";
else if (thehour > 1)
 display = "tree_twilight.css";
else
 display = "tree_sunset.css";

var css = '<';  css+='link rel="stylesheet" href=' + display + ' \/';  css+='>';

document.write(css);

}
*/

//--- Popup window ----------------------------------

function portiPopup(url, name, w, h, mode) {  // no status bar, scroll bars, resizable
	var w = w - 0;
	var h = h - 0;

	if (mode == "fullscreen") {
		var winW = 0;
		var winH = 0;
		w = screen.width;
		h = screen.height;
	}
	else {
		var winW = (screen.width - w) / 2;
		var winH = (screen.height - h) / 2;
		w += 30;
		h += 30;
	}
	var win2 = window.open(url,name,'width='+w+',height='+h+',top='+winH+',left='+winW+',toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no');
	win2.focus();
}


//--- IE PNG fix ----------------------------------


//document.onselectstart = new Function("return false");

if (document.all && document.styleSheets && document.styleSheets[0] &&
  document.styleSheets[0].addRule)
 {

  document.styleSheets[0].addRule('img', 'behavior: url(iepngfix.htc)');
  document.styleSheets[0].addRule('.col', 'behavior: url(iepngfix.htc)');

 }


