function DelTheAd()
{
	var strAdToDel = prompt("Type the Ad # to remove.","CA0");
	FormDelTheAd.AdToDel.value = strAdToDel;
	var strAdPassword = prompt("Type the Password to delete Ad "+ strAdToDel +".","");
	FormDelTheAd.AdPassword.value = strAdPassword;
	FormDelTheAd.submit();
}

function RequestAnAd()
{
	windowprops = "menubars=no,resizable=no,titlebar=no,status=yes,location=no,toolbar=no,scrollbars=no,width=640,height=250,top=50,left=50"; self.name="main";
	text = "<html><title>Request An Ad</title>";
	text += "<body bgcolor='#649B84' text='white'><center>";
	text += "<Script type='text/javascript' src='Includes/NoRightClick.js'></Script>";

	text += "<Form action='classified_ads.php' target='main' name='formRequestAnAd' method='post' onsubmit='return Validator(this)'>";

	text += "<Table border=0 width='95%' align='center'>";
	text += "<TR>";
	text += "	<TD colspan=6 align='Center'><Font>Request An Ad<BR><Font size=2>* = Required</Font></Font></TD>";
	text += "</TR><TR>";
	text += "	<TD class='mbrtd'>*Header</TD>";
	text += "	<TD class='mbrtd'>*PassWord</TD>";
	text += "	<TD class='mbrtd'>Contact</TD>";
	text += "	<TD class='mbrtd'>State</TD>";
	text += "	<TD class='mbrtd'>Telephone</TD>";
	text += "	<TD class='mbrtd'>*Email</TD>";
	text += "	<TD class='mbrtd'>Web Site</TD>";
	text += "</TR><TR>";
	text += "	<TD class='mbrtd'><input class='tbox' type='text' name='AdHeader' size='8' value=''></TD>";
	text += "	<TD class='mbrtd'><input class='tbox' type='password' name='AdPass' size='8' value=''></TD>";
	text += "	<TD class='mbrtd'><input class='tbox' type='text' name='AdContact' size='8' value=''></TD>";
	text += "	<TD class='mbrtd'><input class='tbox' type='text' name='AdState' size='8' value=''></TD>";
	text += "	<TD class='mbrtd'><input class='tbox' type='text' name='AdTelephone' size='8' value=''></TD>";
	text += "	<TD class='mbrtd'><input class='tbox' type='text' name='AdEmail' size='12' value=''></TD>";
	text += "	<TD class='mbrtd'><input class='tbox' type='text' name='AdWebSite' size='10' value=''></TD>";
	text += "</TR><TR>";
	text += "	<TD class='mbrtd'>*Ad Text</TD>";
	text += "	<TD colspan=5 class='mbrtd' align='center'><TextArea name='AdDesc' rows='4' cols='55'></TextArea></TD>";
	text += "</TR><TR>";
	text += "	<TD colspan=6 align='center'><input type='submit' name='AdSubmitBut' value='Submit Ad'></TD>";
	text += "</TR>";
	text += "</Table>";
	text += "</Form>";

	text += "</center></body></html>";
	linkswin = window.open("","",windowprops);
	with (linkswin.document){
		open();
		write(text);
		close();
	}
}

function Validator(theForm)
{
	if(theForm.AdHeader.value == "")
	{
		alert("Please enter a Header!");
		theForm.AdHeader.focus();
		return (false);
	}
	if(theForm.AdPass.value == "")
	{
		alert("Please enter a Password!");
		theForm.AdPass.focus();
		return (false);
	}
	if(theForm.AdEmail.value == "")
	{
		alert("Please enter an eMail Address!");
		theForm.AdEmail.focus();
		return (false);
	}
	if(theForm.AdDesc.value == "")
	{
		alert("Please fill out the Ad Text section!");
		theForm.AdDesc.focus();
		return (false);
	}

	if(theForm.name == "formRequestAnAd")
	{
		theForm.submit();
		window.close();
	}
return (true);
}

// Purpose: To Kill all right clicking ability in a given html document. So that individuals would have to work a lot harder
//			to gain access to the source code and pictures for downloading.
//
// USE:		Cut and paste this code into the html document:
//				<script language="javascript" src="http://www.stealthsystems.com/JS_Includes/NoRightClick.js"></script>
//
// Creator:	Trinisoft

isNetscape = document.layers ? 1 : 0; 

function NoShowContext()
{ 
	if(window.event.button==2 || window.event.keyCode==93)
	{
		return false;
	}
}
if(isNetscape)
{ 
    document.captureEvents(Event.MOUSEDOWN);
}

document.oncontextmenu=new Function("return false")
document.onmousedown=new Function("NoShowContext()")
document.onmouseup=new Function("NoShowContext()")
document.onkeydown=new Function("NoShowContext()")

