var winpop
function openscript(url, width, height) {
	if(winpop!=null && !winpop.closed){ 
	winpop.close() }
	winpop = window.open(url,"openScript",'width=' + width + ',height=' + height + ',resizable=0,scrollbars=yes,menubar=no,status=no' );
	winpop.focus();
}

function clearform(text,which){
	if (which.value==text)
	which.value=''}


function check(form){    
	mailx = document.mmcform.emailaddress.value;
	if ( mailx == "" || mailx.indexOf ('@', 0) == -1 ||  mailx.indexOf ('.', 0) == -1)
	{
		alert ("Invalid E-mail Address !");
		return false;
	}
}
function ss(w){window.status=w;return true;}
function cs(){window.status='';}

function checkAll(xfield,otrigger)
{
	var ocheck = document.getElementById(otrigger);
	
	if(ocheck.checked == 1)
	{
		for(i=0; i<xfield.length; i++)
		{
			xfield[i].checked = 1;
		}
	}
	else
	{
		for(i=0; i<xfield.length; i++)
		{
			xfield[i].checked = 0;
		}
	}

}

