// *
// * @Date <!-- phpDesigner :: Timestamp [23-06-2009 10:01:50] -->
// * @ID include/javascript/global.js
// * @Project StrongNet WebSystem
// * @Author Sérgio Alves
// * @Email sergio.alves@strongnet.pt 
// * @Author pedro Simões
// * @Email pedro.simoes@strongnet.pt
// * @Url http://www.strongnet.pt
// * @Copyright (C) 2004/2009
// *

function changeValue (id, value1, cls) {
  if (document.getElementById(id).value == document.getElementById(id).defaultValue || document.getElementById(id).value == '') {
    document.getElementById(id).value = value1;
  }
  if (cls) {
    changeHover (id, cls);
  }
}

function changeHover (id, cls) { 
  document.getElementById(id).className = cls;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function hideDiv(div) {
		if (document.getElementById) {  // DOM3 = IE5, NS6 ou superior
			document.getElementById(div).style.visibility = 'hidden';
		} else {
			if (document.layers) {  // Netscape 4 e outros inferiores
				document.div.visibility = 'hidden';
			} else {  // IE 4
				document.all.div.style.visibility = 'hidden';
      		}
   		}
}