
function pop(burl,bname,bwidth,bheight) 
{
        var pop=window.open('popup.php?page='+burl, bname, 'toolbar=no, resizable=no, location=no, status=no, scrolling=AUTO, directories=no, scrollbars=no,width=' + bwidth + ',height=' + bheight);
        pop.focus();
}


function popup(burl) 
{
        var pop=window.open('popup.php?'+burl, 'playscopeMediaViewer', 'location=no,toolbar=no,menubar=no, scrollbars=yes,resizable=no,width=640,height=640,status=yes');
        pop.focus();
}


function go(burl) 
{
        var pop=window.open(burl, 'administration', 'toolbar=no, resizable=yes, location=no, status=yes, scrolling=yes, directories=no, scrollbars=yes,width=800,height=600');
        pop.focus();
}

function formValidator()
{
	x=document;
	returnCode="True";

	if ( (x.login.length ==0) || (x.password.length ==0))
	{
 	alert("Un des champs n'est pas ou est mal renseigné");
	returnCode="False";
	}

	if (returnCode=="False") return false; else return true;
}


	function showhidediv( nom, doshow, theclass )
	{
		var divID = nom;
		if ( document.getElementById && document.getElementById( divID ) )
		{
			Pdiv = document.getElementById( divID );
			PcH = true;
	 	}
		else if ( document.all && document.all[ divID ] )
		{
			Pdiv = document.all[ divID ];
			PcH = true;
		}
		else if ( document.layers && document.layers[ divID ] )
		{
			Pdiv = document.layers[ divID ];
			PcH = true;
		}
		else
		{
			PcH = false;
		}
		if ( PcH )
		{
			Pdiv.className = doshow ? theclass : 'cachediv';
		}
	}

	function showhidedivwithform( nom, nomform, nomselect, doshow, theclass )
	{
		var formElems = document.forms[nomform].elements[nomselect];
		var formVal = formElems.options[formElems.selectedIndex].value;

		var divID = nom + "_" + formVal;
		if ( document.getElementById && document.getElementById( divID ) )
		{
			Pdiv = document.getElementById( divID );
			PcH = true;
	 	}
		else if ( document.all && document.all[ divID ] )
		{
			Pdiv = document.all[ divID ];
			PcH = true;
		}
		else if ( document.layers && document.layers[ divID ] )
		{
			Pdiv = document.layers[ divID ];
			PcH = true;
		}
		else
		{
			PcH = false;
		}
		if ( PcH )
		{
			Pdiv.className = doshow ? theclass : 'cachediv';
		}
	}
