function SetChecked(val, chkName) 

{

	dml = document.forms['frm'];

	len = dml.elements.length;

	for( var i = 0; i < len; i++) 

	{

		if (dml.elements[i].name != chkName && dml.elements[i].disabled == false) 

		{

		 dml.elements[i].checked=val;

		}

	}

}

	function send_email(clientID, typeID, type, date, link) 

	   {

		  var popunder=new Array()

		  popunder[0]='?act=send_email&clientID='+clientID+'&typeID='+typeID+'&name='+type+'&date='+date+'&link='+link+'&type=view';

		  var width = '800'; 

		  var height = '500';

		  var p = 'scrollbars=yes,resizable=yes,toolbar=no,' + //these are obvious variables. set "yes" or "no".

		  'menubar=no,status=no,location=no,left=1,top=1,height=' +  //yes/no, & the screen location

		  height + ',width=' + width;

		  win2=window.open(popunder[Math.floor(Math.random()*(popunder.length))],"send_email",p)

	   }



	function newemail_window(template) 

	   {

		  var popunder=new Array()

		  popunder[0]='?act=newemail_wizard_1&template='+template;

		  var width = '800'; 

		  var height = '500';

		  var p = 'scrollbars=yes,resizable=yes,toolbar=no,' + //these are obvious variables. set "yes" or "no".

		  'menubar=no,status=no,location=no,left=1,top=1,height=' +  //yes/no, & the screen location

		  height + ',width=' + width;

		  win2=window.open(popunder[Math.floor(Math.random()*(popunder.length))],"send_email",p)

	   }

	function newsms_window(template) 

	   {

		  var popunder=new Array()

		  popunder[0]='?act=newsms_wizard_1&template='+template;

		  var width = '800'; 

		  var height = '500';

		  var p = 'scrollbars=yes,resizable=yes,toolbar=no,' + //these are obvious variables. set "yes" or "no".

		  'menubar=no,status=no,location=no,left=1,top=1,height=' +  //yes/no, & the screen location

		  height + ',width=' + width;

		  win2=window.open(popunder[Math.floor(Math.random()*(popunder.length))],"send_sms",p)

	   }
