var xmlHttp

function GetXmlHttpObject()
{ 
	var objXMLHttp=null
	if (window.XMLHttpRequest)
	{
		objXMLHttp=new XMLHttpRequest()
	}
	else if (window.ActiveXObject)
	{
		objXMLHttp=new ActiveXObject("Microsoft.XMLHTTP")
	}
	return objXMLHttp
}


//============== Home Page ================
function Get_Comment_List(sReturnURL,Blog_Listing_Id,Blog_Category_Id,PNO,Daplay_Ajax)
{ 

if (Daplay_Ajax=="YES") {
	document.getElementById("Fir_Comments_List").innerHTML=""
}

document.getElementById("Comments_List").innerHTML="<img src='load.gif'>"

	xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null)
	{
		alert ("Browser does not support HTTP Request")
		return
	} 
	var url="../Blog/blog.asp"	
	url=url+"?ram_id="+Math.random()
	url=url+"&sReturnURL="+sReturnURL
	url=url+"&Blog_Listing_Id="+Blog_Listing_Id
	url=url+"&Blog_Category_Id="+Blog_Category_Id
	url=url+"&PNO="+PNO
	url=url+"&Daplay_Ajax="+Daplay_Ajax
	xmlHttp.onreadystatechange=Get_Comment_List_Change
	xmlHttp.open("GET",url,true)
	xmlHttp.send(null)
}
function Get_Comment_List_Change() 
{ 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{ 
		document.getElementById("Comments_List").innerHTML=xmlHttp.responseText 
	} 
}
//============== End Home Page ================

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function frmValidate(){

String.prototype.trim = function() { return this.replace(/^\s+|\s+$/, ''); };

	if (document.frm_violation.UserID.value==""){
		alert("Please Enter Your Name!");
		document.frm_violation.UserID.focus();
		return false;
	}	
	
	if (document.frm_violation.mMsg_violationCode.value==""){
		alert("Please Select Violation!");
		document.frm_violation.mMsg_violationCode.focus();
		return false;
	}	

	if (document.frm_violation.mMsg_comments.value==""){
		alert("Please Enter Comments!");
		document.frm_violation.mMsg_comments.focus();
		return false;
	}	

var comments;
comments=document.frm_violation.mMsg_comments.value;
comments = comments.trim();

	if(comments==""){
	  alert("Please Enter Comments!");
	  document.frm_violation.mMsg_comments.focus();
	  return false;
	 }
	 
	if(document.frm_violation.Anti_Bot_User_Entered_Code.value==""){
			  alert("Please enter code");
			  document.frm_violation.Anti_Bot_User_Entered_Code.focus();
			  return false;
	  } 

	if(document.frm_violation.Anti_Bot_User_Entered_Code.value!=document.frm_violation.Anti_Bot_User_Expected_Code.value){
			 alert("Please enter correct code");
		     document.frm_violation.Anti_Bot_User_Entered_Code.focus();
		     return false;
	}
}	

function Get_Show(){ 
	eval("document.getElementById('show_post_comt').style.display = 'block'");
}

function Get_Show_1(){ 
	eval("document.getElementById('show_login').style.display = 'block'");
}