function button_over(eButton)
	{
	eButton.style.borderWidth = "1px";
	eButton.style.borderStyle = "solid";
	eButton.style.borderColor = "threedhighlight threedshadow threedshadow threedhighlight";
	}
function button_out(eButton)
	{
	eButton.style.border = "solid 1px threedface";
	eButton.style.borderColor = "threedface";
	}
function button_down(eButton)
	{
	eButton.style.borderStyle = "solid";
	eButton.style.borderColor = " threedshadow threedhighlight threedhighlight threedshadow ";
	}
function button_up(eButton)
	{
	eButton.style.border = "solid 1px threedface";
	eButton.style.borderColor = "threedface";
	eButton = null; 
	}
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

var isHTMLMode=false
function document.onreadystatechange()
	{
  	idContent.document.designMode="On"
	}
function cmdExec(cmd,opt) 
	{
  	idContent.focus();
	if (isHTMLMode){alert("Please uncheck 'Edit HTML'");return;}
  	idContent.document.execCommand(cmd,"",opt);idContent.focus();
	}
function setMode(bMode)
	{
	var sTmp;
	isHTMLMode = bMode;
	if (isHTMLMode){sTmp=idContent.document.body.innerHTML;idContent.document.body.innerText=sTmp;} 
	else {sTmp=idContent.document.body.innerText;idContent.document.body.innerHTML=sTmp;}
	idContent.focus();
	}
function createLink()
	{
	idContent.focus
	if (isHTMLMode){alert("Please uncheck 'Edit HTML'");return;}
	cmdExec("CreateLink");
	}
function insertImage()
	{
	if (isHTMLMode){alert("Please uncheck 'Edit HTML'");return;}
	var sImgSrc=prompt("Insert Image File (You can use your local image file) : ", "http://www.aspalliance.com/Yusuf/Article10/sample.jpg");
	if(sImgSrc!=null) cmdExec("InsertImage",sImgSrc);
	}
function foreColor()
	{
	var arr = showModalDialog("/forum/color.asp","","font-family:Verdana; font-size:12; dialogWidth:20em; dialogHeight:18em; status:no; help: no" );
	if (arr != null) cmdExec("ForeColor",arr);	
	}
function backColor()
	{
	var arr = showModalDialog("/forum/color.asp","","font-family:Verdana; font-size:12; dialogWidth:20em; dialogHeight:18em; status:no; help: no" );
	if (arr != null) cmdExec("BackColor",arr);	
	}
function savedocument() {  
	if (isHTMLMode){alert("Please uncheck 'Edit HTML'");return;}
	if (location.pathname=='/ssl/add1.asp') {
		if(document.saveform.cTitle.value=='') {
			alert("Please enter a Title for your Commercial Classified.");document.saveform.cTitle.focus();event.returnValue = false;return false;
		}
		if(idContent.document.body.innerHTML=='') {
			alert("Please enter the text for your Commercial Classified.");event.returnValue = false;return false;
		}
	}
	if (location.pathname=='/submit/add1.asp') {
		if(document.saveform.cTitle.value=='') {
			alert("Please enter a Title for your advertisement.");document.saveform.cTitle.focus();return false;
		}
		if(idContent.document.body.innerHTML=='') {
			alert("Please enter the text for your advertisement.");return false;
		}
	}
	if (location.pathname=='/forum/posttopic.asp') {
		if(document.saveform.Subject.value=='') {
			alert("Please enter a Subject for your new Topic.");document.saveform.Subject.focus();event.returnValue = false;return false;
		}
		if(idContent.document.body.innerHTML=='') {
			alert("Please enter the Message text for your posting.");return false;
		}
	}
  	document.saveform.msg.value=idContent.document.body.innerHTML;
  	document.saveform.submit(); // submit form for save
}
