/**
 * JavaScript library
 * Version: 2009
 * Depends: jquery-1.4.1.js
 */
// Addition meta information
document.write('<meta http-equiv="imagetoolbar" content="no" />');
document.write('<link rel="shortcut icon" type="image/x-icon" href="/img/common/favicon.ico" />');

/**
 * External links
 */
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";
	}
}
$(function(){ externalLinks()});

/**
 * Rollover images
 */
function smartRollover(){
	if(document.getElementsByTagName){
		var imageTags = document.getElementsByTagName("img");
		for(var i=0; i < imageTags.length; i++){
			if(imageTags[i].className == "rollover"){
				if(imageTags[i].getAttribute("src").match("_off.")){
					imageTags[i].onmouseover = function(){
						this.setAttribute("src",this.getAttribute("src").replace("_off.","_on."));
					}
					imageTags[i].onmouseout = function(){
						this.setAttribute("src",this.getAttribute("src").replace("_on.","_off."));
					}
				}
			}
		}
	}
}
$(function(){ smartRollover()});

/**
 * Popup new window
 */
function popupWindow(popHref,popWidth,popHeight){
	popUpWin = window.open(
		popHref,
		"subwin",
		"width="+popWidth+",height="+popHeight+",scrollbars=1,resizable=1,directories=0,toolbar=0,status=1,location=0"
		);
	popUpWin.focus();
}