var cssid = "primary-nav"; 
var menuadd = "h";  
var menuh = "menuh";
if (window.attachEvent) window.attachEvent("onload", cssHover);
function cssHover() {
	var sfEls = document.getElementById(cssid).getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {

		sfEls[i].onmouseover=function() {
			if (this.className != "") {
				this.className = this.className + menuadd;
			}
			else {	
				this.className = menuh;
			}
		}

		sfEls[i].onmouseout=function() {
			if (this.className == menuh) {
				this.className = "";
			}
			else {
				this.className = this.className.replace(new RegExp(menuadd + "$"), "");
			}
		}
	}
}

function Showdate()
{
	mon = new Array('January','February','March','April','May','June','July','August','September','October','November','December');
	gd = new Date();
	m=gd.getMonth();
	d=gd.getDate();
	y=gd.getYear();
	if (y<1900){y+=1900};
	out =mon[m]+' '+d+', '+y;
	document.getElementById('current_date').innerHTML = out;
}

function PopupPic(title,w,h,k) {
	var winl = (screen.width - w) / 2;
	var wint = (screen.height - h) / 2;
	var smarty_hack = 'head';
	var test1 = window.parent.document.getElementById('album_content'+k).innerHTML;
	nme='picture_pop';
	newWindow = window.open('',nme,'height='+h+',width='+w+',top='+wint+',left='+winl+',resizable=0,scrollbars=0');
	newWindow.document.write('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">');
	newWindow.document.write('<html><head><title>'+title+'</title>');
	newWindow.document.write('<meta http-equiv="content-type" content="text/html; charset=UTF-8" />');
	newWindow.document.write('<link rel="stylesheet" type="text/css" href="css/style_popup.css">');
	newWindow.document.write('</'+smarty_hack+'><body onclick="self.close()">');
	newWindow.document.write('<div align="center"><table cellpadding="0" cellspacing="0">');
	newWindow.document.write('<tr><td id="container">'+test1+'</td></tr>');
	newWindow.document.write('</table></div></body></html>');
	newWindow.document.close();
	newWindow.focus();
}

function MM_changeColor(objId, theValue) { 
  var obj = null; with (document){ if (getElementById)
  obj = getElementById(objId); }
  if (obj){
   	   obj.style.borderColor =theValue;
  }
}

function MM_changeColor1(objId, theValue) { 
  var obj = null; with (document){ if (getElementById)
  obj = getElementById(objId); }
  if (obj){
   	  obj.style.borderColor =theValue;
	  
  }
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}