function xmlhttp()
{
var A=null;
try
{
A=new ActiveXObject("Msxml2.XMLHTTP");
}
catch(e)
{
try
{
A=new ActiveXObject("Microsoft.XMLHTTP");
}
catch(oc)
{
if (typeof XMLHttpRequest != "undefined" );
{
A=new XMLHttpRequest();
}
}
}
return A;
}
var loader=new xmlhttp;
function ajaxLoadPage(url,request,method,fun)
{
method=method.toUpperCase();
if (method=='GET')
{
urls=url.split("?");
if (urls[1]=='' || typeof urls[1]=='undefined')
{
url=urls[0]+"?"+request;
}
else
{
url=urls[0]+"?"+urls[1]+"&"+request;
}
request=null;
}
loader.open(method,url,true);
if (method=="POST")
{
loader.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
}
loader.onreadystatechange=function(){
eval(fun+'()');
}
loader.send(request);
}
function formToRequestString(form_obj)
{
var query_string='';
var and='';
for (var i=0;icmax) {
cobj.value = cobj.value.substring(0,cmax);
alert("评论ä¸èƒ½è¶…过"+cmax+"个å—符!");
}
else {
document.getElementById('cmax').value = cmax-cobj.value.length;
}
}
function checkform()
{
var anounname=document.getElementById('AnounName');
var C_Content=document.getElementById('C_Content');
var sC_Content=document.getElementById('sC_Content');
var anonymous=document.getElementById('Anonymous');
var pass=document.getElementById('Pass');
if (anounname.value==''){
alert('请填写用户å。');
anounname.focus();
return false;
}
if (anonymous.checked==false && pass.value=='')
{
alert('请输入密ç 或选择游客å‘表ï¼');
pass.focus();
return false;
}
if (document.getElementById('VerifyCode').value==''){
alert('请入验è¯ç !');
document.getElementById('VerifyCode').focus();
return false;
}
if (C_Content.value==''){
alert('请填写评论内容!');
C_Content.focus();
return false;
}
sC_Content.value=C_Content.value;
//document.form1.submit();
try
{ajaxFormSubmit(document.form1,'success');
}catch(e)
{
document.form1.action="http://www.dsfauto.com/plus/Comment.asp?Action=WriteSave&flag=NotAjax";
document.form1.submit();
}
}
document.write('');