function toggleViewAndChangeLabel(id,labelId,labelShow,labelHide) {
    var lableElement = document.getElementById(labelId);
    var blockElement = document.getElementById(id);
    if (blockElement.className == 'showAndPrint') {
        blockElement.className = 'hideAndNoPrint';
        lableElement.innerHTML = labelShow;
    } else {
        blockElement.className = 'showAndPrint';
        lableElement.innerHTML = labelHide;
    }
}

function Clear(theText) {
	if (theText.value == theText.defaultValue) {
	theText.value = " "
	}
}

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 fnLogin_Jump(){
	var strUrl = document.frmLogin.cboLogin.value;	
	window.open(strUrl);
	
	//var strIndex = document.frmLogin.cboLogin.selectedIndex;
	//var strOption = document.frmLogin.cboLogin.options[strIndex].value;	
	//if (document.frmLogin.cboLogin.options[strIndex].value != 0) {	
	//	window.open(strOption);
	//}
}

function fnRegister_Jump(){
	var strUrl = document.frmRegister.cboRegister.value;
	window.open(strUrl, 'newWin','width=800,height=600,menubar=no,scrollbars=yes,resizable=yes',true);
	
	//var strIndex = document.frmRegister.cboRegister.selectedIndex;
	//var strOption = document.frmRegister.cboRegister.options[strIndex].value;
	//if (document.frmLogin.cboLogin.options[strIndex].value != 0) {
	//	window.open(strOption, 'newWin','width=800,height=600,menubar=no,scrollbars=yes,resizable=yes',true);
	//}
}

function fnAccountTasks_Jump(theSelectElement, db, accountId){
		var strIndex = theSelectElement.selectedIndex;	
		var strOption = theSelectElement.options[strIndex].value;
		if (strIndex != 0) {	
			window.location.href = strOption + '?&db=' + db + '&accountId=' + accountId;
		}
}

function fnAssetLiability_Jump(){
	var strIndex = document.frmAssetLiability.cboAssetLiability.selectedIndex;
	var strOption = document.frmAssetLiability.cboAssetLiability.options[strIndex].value;	
	if (document.frmAssetLiability.cboAssetLiability.options[strIndex].value != 0) {	
		window.location.href = strOption;
	}
}	