// JavaScript Document
function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}
function changeHeight(intHeight){
	top.document.getElementById("dateframe").height = intHeight;
}
function autoResize_iframe(objContents, strFrameName, intResizeType) {
	var intHeight = objContents.scrollHeight;
	var intWidth = objContents.scrollWidth;
	if (intResizeType =="") {intResizeType = 0}
	if ((intResizeType == 1)||(intResizeType = 0)) {parent.document.getElementById(strFrameName).height = intHeight;}
	if ((intResizeType == 2)||(intResizeType = 0)) {parent.document.getElementById(strFrameName).width = intWidth;}
}

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 disableElement(objElement,blnState) {
	if (undefined == blnState) {
		if (objElement.disabled) {blnState = false}else{blnState = true};
	};	
	objElement.disabled = blnState;
}

function confirmAction(strMsg,strAction){
	var intResponse = confirm(strMsg)
	if (intResponse){
		if (strAction != ''){location.href = strAction};
		return true
	}else{
		return false
	};
}

function swapBackImage(objThis,strBack) {
	var strTempBackImage = objThis.style.backgroundImage
	//objThis.onmouseout =function () { clearSwap(this)}
	objThis.onmouseout = (function (strBack) {return function() {objThis.style.backgroundImage = strTempBackImage}})(strTempBackImage)
	//objThis.onmouseout = function () {this.childNodes[0].style.backgroundImage = ""}
	objThis.style.backgroundImage = "url(images/homepage08/" + strBack + ")"
}
function clearSwap(objThis,strBack) {
	objThis.style.backgroundImage = strTempBackImage
	strTempBackImage = ""
	objThis.onmouseout = ""
}


function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

//window.onload = externalLinks;
