function toggleShowHideLayer ( stringObject ) {
	objElement = document.getElementById( stringObject );
	if ( objElement.style.display == 'block' ){
		objElement.style.display = 'none';
	} else {
		objElement.style.display = 'block';		
	}
}

function getElementsByClassName(stringElementType, stringClassName) {
 d = document.getElementsByTagName(stringElementType);
 j=0;
 var cl = new Array()
 for(i=0;i<d.length;i++){
  if(d[i].className == stringClassName){
   cl[j] = d[i];
   j++
  }
 }
 return cl
}
 
function hideClass ( stringElementType, stringClassName ){
 objElements = getElementsByClassName(stringElementType, stringClassName);
 for (i=0;i<objElements.length;i++){
  objElements[i].style.display = 'none';
 }
}

function showClass ( stringElementType, stringClassName ){
 objElements = getElementsByClassName(stringElementType, stringClassName);
 for (i=0;i<objElements.length;i++){
  objElements[i].style.display = 'block';
 }
}

function login_type(){
	document.loginForm.action = document.getElementById('login').value;
	document.getElementById('stringLogin').value = document.getElementById('stringUser').value;
}

function changeLogin(login) {
	arrElements = getElementsByClassName ( 'form', 'login_form')
	for(i=0;i<arrElements.length;i++){
		arrElements[i].style.display = 'none';
	}
	
	document.getElementById(login+'Form').style.display = 'block';
}