function submitFormCommand(formName, methodName) {
	alert(formName + ', ' + methodName);
	document.forms[formName].method.value = methodName;
	document.forms[formName].submit();
}

function openNewWindow (url) {
  	myWindow = window.open(url, "BASF", "scrollbars=yes,resizable=yes,dependent=yes,width=800,height=500,left=100,top=5");
  	myWindow.focus();
}

function openNewImageWindow (url) {
  	myWindow = window.open(url, "BASF", "scrollbars=yes,resizable=yes,dependent=yes,width=500,height=400,left=200,top=200");
  	myWindow.focus();
}


function openNewWindowNoDepend (url) {
  	myWindow = window.open(url, "BASF");
  	myWindow.focus();
}


function show_description(name) {
//	alert("Show:" +name);
	var elem, vis;
  if( document.getElementById ) // this is the way the standards work
    elem = document.getElementById( name );
  else if( document.all ) // this is the way old msie versions work
      elem = document.all[name];
  else if( document.layers ) // this is the way nn4 works
    elem = document.layers[name];
  vis = elem.style;
  
  vis.display = 'block';
}

function hide_description(name) {
//	alert("Hide:" +name);
    var elem, vis;
  if( document.getElementById ) // this is the way the standards work
    elem = document.getElementById( name );
  else if( document.all ) // this is the way old msie versions work
      elem = document.all[name];
  else if( document.layers ) // this is the way nn4 works
    elem = document.layers[name];
  vis = elem.style;
  
  vis.display = 'none';
}
function sendMail(actionUrl){
         var tmpForm = document.createElement("form");
         tmpForm.action=actionUrl;
         tmpForm.method="POST";
      
         var hiddenBackUrl=document.createElement("input");
         hiddenBackUrl.setAttribute("type", "hidden");
         hiddenBackUrl.setAttribute("name", "backLink");
         hiddenBackUrl.setAttribute("value", window.location.href);
       
         tmpForm.appendChild(hiddenBackUrl); 
         
          //Dynamic generate hidden fields
      for(var i = 0; i < document.getElementById("mailHiddenForm").elements.length; i++){
           var e = document.getElementById("mailHiddenForm").elements[i];
        if(e.type == "hidden"){
                var regionHidden = document.createElement("input");
                regionHidden.setAttribute("type", "hidden");
                regionHidden.setAttribute("name", e.name);
                regionHidden.setAttribute("value", e.value);
                tmpForm.appendChild(regionHidden);
                     
            }
       }
       
         document.body.appendChild(tmpForm);
         
         tmpForm.submit();
}
