﻿// JavaScript Document
function switchCountry(){
 location.href=document.forms.frmCountry.selectCountry.value;
}
function switchAction(act){
 document.forms[0].action = 'index.cfm?action=' + act;
return true;
}
function switchActionSubmit(act){
 document.forms[0].action = 'index.cfm?action=' + act;
 document.forms[0].submit();
return true;
}
function switchLocation(act){
 location.href = 'index.cfm?action=' + act; 
 return true;
}
function helpWindow(url){
  helpWin = window.open(url, 'helpWindow','scrollbars=yes,resizable=no,toolbar=no,height=450,width=400');
  if(window.focus){helpWin.focus();}
}
function smallWindow(url){
  smallWin = window.open(url, 'smallWindow','scrollbars=yes,resizable=yes,toolbar=no,height=500,width=475');
  if(window.focus){smallWin.focus();}
}

function toggleByTagNameId(tag, id){
    if (tag.length < 1 || id.length < 1) {return;}
	var tags = document.getElementsByTagName(tag);
	
	for (var i=0; i<tags.length; i++){
    	tags[i].style.display = "none";
    	if(tags[i].getAttribute("id") == id){
    		tags[i].style.display = "block";
    	}        
    }
}