//No Frames
if (top.frames.length!=0)
top.location=self.document.location;

//Window Dressing
var win=null;
function NewWindow(mypage,myname,w,h,scroll,pos){
if(pos=="random"){LeftPosition=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;TopPosition=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;}
if(pos=="center"){LeftPosition=(screen.width)?(screen.width-w)/2:100;TopPosition=(screen.height)?(screen.height-h)/2:100;}
else if((pos!="center" && pos!="random") || pos==null){LeftPosition=0;TopPosition=20}
settings='width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no';
win=window.open(mypage,myname,settings);}

//Mail Man
function isEmpty(str) {
	// Check whether string is empty.
	for (var intLoop = 0; intLoop < str.length; intLoop++)
	   if (" " != str.charAt(intLoop))
		  return false;
	return true;
 }
 function checkRequired(f) {
	var strError = "";
	for (var intLoop = 0; intLoop < f.elements.length; intLoop++)
	   if (null!=f.elements[intLoop].getAttribute("required")) 
		  if (isEmpty(f.elements[intLoop].value))
			 strError += "  " + f.elements[intLoop].name + "\n\n";
	if ("" != strError) {
	   alert("\n\n Please complete the following information before submitting:      \n\n\n" + strError);
	   return false;
	} 
		else
	return true;
 }
 
 //Domain reference
/*
var s = new String(window.location); 
var adr=s;
var theChar=adr.charAt(28);
if ((theChar != 'd') & (theChar != 'D')) {
	var m = new String('pelletierlaw.com'); 
	var l = m.length; 
	var p = s.indexOf(m); 
	var d = s.substring(p + l, s.length); 
	window.location = 'http://www.pelletierlaw.com/default.asp';
}
*/
