// JavaScript Document

//=======================================================================
// Preload Images and RollOver
//=======================================================================

var sActHref = window.location.href;
var sLng = sActHref.substr(sActHref.indexOf(".ca/") + 4, 2);

//var sSectFolderName = sActHref.substr(sActHref.indexOf(sLng + "/") + 3, sActHref.indexOf("/", sActHref.indexOf(sLng + "/") + 3) - (sActHref.indexOf(sLng + "/") + 3));


//=======================================================================
// Preload Images and RollOver
//=======================================================================

var preloadFlag = false;


function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}


function changeImages() {
	if (document.images) {
    	for (var i=0; i<changeImages.arguments.length; i+=2) {
    		document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
    	}
    }
}



function roll_over(img_name, img_src)
   {
   document[img_name].src = img_src;
   }


//=======================================================================
// Function Popup for User Login
//=======================================================================
function callNewPage(formId) {
	var tempObj = document[formId].choice
	newObj = window.open(tempObj[tempObj.selectedIndex].value, "newObj", "width=770,height=550,left=10,top=10,resizable=yes,scrollbars=yes,location=yes,toolbar=yes,directories=yes,status=yes,menubar=yes");
}



function navigate(theForm)
{

  if (theForm.options[theForm.selectedIndex].value=="0")
	{	
		return (false);
	}
		window.location.href=theForm.options[theForm.selectedIndex].value;
		theForm.selectedIndex=0;
		return (true);
}

