	function doopen(file,w,h)
		{
		h=window.open(file,'_new','left=0,top=0,width='+w+',height='+h+',status=no,toolbar=no,menubar=no,location=no,resizable=no,scrollbars=no',true);								
		h.focus();
		return false;
		}
		
	function doclear(textbox) 
        {
        if (textbox.value == textbox.defaultValue)
            {
            textbox.value = ""
            }
        }

	// check for empty fields

	function doCheck(e)
		{		
		var sName = new String(document.forms[0].realname.value);
		var sEmail = new String(document.forms[0].email.value);
		var sRequest = new String(document.forms[0].request.value);
		if ((sName.length == 0) || (sName.indexOf('type your name here') == 0) || (sName.indexOf('your name') == 0))
			{
			alert('Please enter your Name so we may contact you, thank you.');
			if (e && e.preventDefault) e.preventDefault();
			return(false);
			}
		if ((sEmail.length == 0) || (sEmail.indexOf('type your email address here') == 0) || (sEmail.indexOf('email') == 0))
			{
			alert('Please enter your Email address so we may contact you, thank you.');
			if (e && e.preventDefault) e.preventDefault();
			return(false);
			}
		if ((sRequest.length == 0) || (sRequest.indexOf('type your message here') == 0))
			{
			alert('Please enter a message, thank you.');
			if (e && e.preventDefault) e.preventDefault();
			return(false);
			}
		
		document.forms[0].submit();
		return(true);
		}
		
    function addEvent(obj, evType, fn)
    {
	    if (obj.addEventListener)
	    {
   		    obj.addEventListener(evType, fn, false);
   		    return true;
	    }
	    else if (obj.attachEvent)
	    {
   		    var r = obj.attachEvent("on"+evType, fn);
   		    return r;
 	    }
 	    else
 	    {
   		    return false;
 	    }
    }		