// open external links in a new window
// standard-compliant method; target=_blank is not allowed in STRICT doctype
// invoke by assigning rel="external" to a link, ie
// <a href="http://www.google.com/" rel="external">www.google.com</a>
// 
//  full article can be found here: http://www.sitepoint.com/article/standards-compliant-world

function externalLinks() {
 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";
 }
}
window.onload = externalLinks;

function setHighlight(lvl,imgID){
	for (i = 1; i <= imgID; i++) {
		//if (!(!document.getElementById("star_" + lvl + "_" + i)))
			document.getElementById("star_" + lvl + "_" + i).src="/img/card/iconRatingOn.gif";
	}
}
function setLowlight(lvl,imgID){
	for (i = 1; i <= imgID; i++) {
		//if (!(!document.getElementById("star_" + lvl + "_" + i)))	
			document.getElementById("star_" + lvl + "_" + i).src="/img/card/iconRatingOff.gif";
	}
}