function isEmail(str)
{
 	var supported = 0;

 	if (window.RegExp)
	{
   		var tempStr = "a";
		var tempReg = new RegExp(tempStr);
		if (tempReg.test(tempStr)) supported = 1;
  	}

	if (!supported) 
		return (str.indexOf(".") > 2) && (str.indexOf("@") > 0);

	var r1 = new RegExp("(@.*@)|(\\.\\.)|(@\\.)|(^\\.)");
	var r2 = new RegExp("^.+\\@(\\[?)[a-zA-Z0-9\\-\\.]+\\.([a-zA-Z]{2,5}|[0-9]{1,3})(\\]?)$");
	
	var valid = (!r1.test(str) && r2.test(str));
	
	if (valid == false)
		alert("'"+str+"'" + " is not a valid Email address");

	return valid;

}

function popup(w, h, url) {
	window.open(url,"_blank",'width='+w+',height='+h+',scrollbars=no,status=no,menubar=no,location=no,resizable=no');
}


function addbookmark()
{ 
	general="First click OK and then hit CTRL+D to bookmark this page.";
	opera="First click OK and then hit CTRL+T to bookmark this page.";
	if ((navigator.userAgent).indexOf("Opera")!=-1)
		alert(opera); 
	else //(navigator.appName).indexOf("Microsoft")!=-1 || navigator.appName=='Netscape'
		alert(general); 
}


function prep() {
 if (!document.getElementsByTagName) return;
 var anchors = document.getElementsByTagName("a");
 for (var i=0; i<anchors.length; i++) {
   var anchor = anchors[i];
   if (anchor.getAttribute("href") &&
       anchor.getAttribute("rel") == "external")
     anchor.target = "_blank";
 }
 if (!document.getElementById) return;
	document.getElementById("pastissues").getElementsByTagName("select")[0].onchange=function(){document.location = this.options[this.selectedIndex].value;};
}
window.onload = prep;

function toggleEpand(element) {

	if (element.className == "")
		element.className = "expanded";
	else
		element.className = "";

//	var expandLink = element.getElementsByTagName('a');
		
//	if (element.style.height == "29px" || element.style.height == "") {
//		element.style.height = "auto";
//		expandLink[0].style.backgroundPosition = "bottom left";
//	}
//	else {
//		element.style.height = "29px";
//		expandLink[0].style.backgroundPosition = "top left";
//	}
		
	return false;
}