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_Review_Box(product_id){ 

	xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null)
	{
		alert ("Browser does not support HTTP Request")
		return
	} 
	var url="Get_Review_Box.php"	
	url=url+"?product_id="+product_id
	url=url+"&ram_id="+Math.random()
	xmlHttp.onreadystatechange=Get_Review_Box_Change
	xmlHttp.open("GET",url,true)
	xmlHttp.send(null)

}
function Get_Review_Box_Change() 
{ 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete"){ 
		document.getElementById("Get_Review_Box").innerHTML=xmlHttp.responseText 
	} 
}
//============== End Home Page ================

function Get_Clean() { 
		document.getElementById("Get_Review_Box").innerHTML="";
}
//============== End Home Page ================
//==============================================================================================

function Go_TelA_Frd(){ 

document.getElementById("Show_Tel_Message").innerHTML=""

var your_name,friends_emails
var go_flag

go_flag="YES"

your_name=document.frm_telafrd.your_name.value
friends_emails=document.frm_telafrd.friends_emails.value
action_action=document.frm_telafrd.action_action.value

	if (document.frm_telafrd.your_name.value==""){
		alert("Please Enter Your Name ...!");
		document.frm_telafrd.your_name.focus();
		go_flag="NO"
		return;
	}

	if (document.frm_telafrd.friends_emails.value==""){
		alert("Please Enter Your Friends email address ...!");
		document.frm_telafrd.friends_emails.focus();
		go_flag="NO"	
		return;
	}

if (go_flag=="YES") { // go flag
document.getElementById("Show_Tel_Message").innerHTML="<img src='images/load.gif' width='175'>"
	xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null)
	{
		alert ("Browser does not support HTTP Request")
		return
	} 
	
	var url="Go_TelA_Frd.php"
	var parameters="your_name="+your_name
	parameters=parameters+"&friends_emails="+friends_emails
	parameters=parameters+"&action_action="+action_action
	parameters=parameters+"&ram_id="+Math.random()
	xmlHttp.onreadystatechange=Go_TelA_Frd_Change
	//xmlHttp.open("GET",url,true)
	//xmlHttp.send(null)
	xmlHttp.open("POST",url,true)
      xmlHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
      xmlHttp.setRequestHeader("Content-length", parameters.length);
      xmlHttp.setRequestHeader("Connection", "close");
      xmlHttp.send(parameters);
	} // go flag
}
function Go_TelA_Frd_Change() { 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete"){ 
		document.frm_telafrd.your_name.value=""
		document.frm_telafrd.friends_emails.value=""
		document.getElementById("Show_Tel_Message").innerHTML=xmlHttp.responseText		 
	} 
}

//============== Home Page ================

function Get_Comments(){ 

	xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null)
	{
		alert ("Browser does not support HTTP Request")
		return
	} 
	var url="Get_Comments.php"	
	url=url+"?ram_id="+Math.random()
	xmlHttp.onreadystatechange=Get_Comments_Change
	xmlHttp.open("GET",url,true)
	xmlHttp.send(null)

}
function Get_Comments_Change() 
{ 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete"){ 
		document.getElementById("Show_Comments").innerHTML=xmlHttp.responseText 
		//Show_Captchya()
	} 
}
//============== End Home Page ================


//==============================================================================================

function Go_Add_Comments(){ 

document.getElementById("Show_Comments_Message").innerHTML=""

var comments_siteid,comments_name,comments_category,comments_subject,comments_description,comments_captcha
var go_flag

go_flag="YES"

comments_siteid=document.frm_comments.comments_siteid.value
comments_name=document.frm_comments.comments_name.value
comments_category=document.frm_comments.comments_category.value
comments_subject=document.frm_comments.comments_subject.value
comments_description=document.frm_comments.comments_description.value
comments_captcha=document.frm_comments.comments_captcha.value
action_action=document.frm_comments.action_action.value

	if (document.frm_comments.comments_name.value=="Name"){
		alert("Please Enter Your Name ...!");
		document.frm_comments.comments_name.focus();
		go_flag="NO"
		return;
	}

	if (document.frm_comments.comments_name.value==""){
		alert("Please Enter Your Name ...!");
		document.frm_comments.comments_name.focus();
		go_flag="NO"
		return;
	}

	if (document.frm_comments.comments_subject.value=="Subject"){
		alert("Please Enter Subject ...!");
		document.frm_comments.comments_subject.focus();
		go_flag="NO"
		return;
	}

	if (document.frm_comments.comments_subject.value==""){
		alert("Please Enter Subject ...!");
		document.frm_comments.comments_subject.focus();
		go_flag="NO"
		return;
	}

	if (document.frm_comments.comments_description.value==""){
		alert("Please Enter Your Comment ...!");
		document.frm_comments.comments_description.focus();
		go_flag="NO"	
		return;
	}
	if (document.frm_comments.comments_captcha.value==""){
		alert("Please Captcha Code ...!");
		document.frm_comments.comments_captcha.focus();
		go_flag="NO"	
		return;
	}	
	

if (go_flag=="YES") { // go flag

	document.getElementById("Show_Comments_Message").innerHTML="<img src='images/load.gif' width='175'>"
	
	xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null)
	{
		alert ("Browser does not support HTTP Request")
		return
	} 
	
	var url="Go_Add_Comments.php"
	var parameters="comments_siteid="+comments_siteid
	parameters=parameters+"&comments_name="+comments_name
	parameters=parameters+"&comments_category="+comments_category
	parameters=parameters+"&comments_subject="+comments_subject
	parameters=parameters+"&comments_description="+comments_description
	parameters=parameters+"&comments_captcha="+comments_captcha
	parameters=parameters+"&action_action="+action_action
	parameters=parameters+"&ram_id="+Math.random()
	xmlHttp.onreadystatechange=Go_Add_Comments_Change
	//xmlHttp.open("GET",url,true)
	//xmlHttp.send(null)
	xmlHttp.open("POST",url,true)
      xmlHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
      xmlHttp.setRequestHeader("Content-length", parameters.length);
      xmlHttp.setRequestHeader("Connection", "close");
      xmlHttp.send(parameters);
	} // go flag
}
function Go_Add_Comments_Change() { 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete"){ 
	
		document.getElementById("Show_Comments_Message").innerHTML=xmlHttp.responseText	
		
		//if (document.getElementById("Show_Comments_Message").innerHTML=="<font color='#FF0000'><strong>Your comment has been sent...</strong></font>"){
			document.frm_comments.comments_name.value="Name"
			document.frm_comments.comments_subject.value="Subject"
			document.frm_comments.comments_captcha.value=""
			document.frm_comments.comments_description.value=""
			document.frm_comments.comments_captcha.value=""
			document.frm_comments.comments_category.value="1"	
			Get_Comments()
		//}
	} 
}

//============== Home Page ================


//============== Home Page ================

function Show_Captchya(){ 

	xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null)
	{
		alert ("Browser does not support HTTP Request")
		return
	} 
	var url="random.php"	
	url=url+"?ram_id="+Math.random()
	xmlHttp.onreadystatechange=Show_Captchya_Change
	xmlHttp.open("GET",url,true)
	xmlHttp.send(null)

}
function Show_Captchya_Change() 
{ 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete"){ 
		var show_captch

		//show_captch = '<img src=' + xmlHttp.responseText + '>';
		document.getElementById("Show_Captchya").innerHTML=xmlHttp.responseText 
	} 
}
//============== End Home Page ================

//============== Home Page ================
function Get_General_Comments(start){ 

	xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null)
	{
		alert ("Browser does not support HTTP Request")
		return
	} 
	var url="Get_General_Comments.php"	
	url=url+"?start="+start
	url=url+"&ram_id="+Math.random()
	xmlHttp.onreadystatechange=Get_General_Comments_Change
	xmlHttp.open("GET",url,true)
	xmlHttp.send(null)

}
function Get_General_Comments_Change() 
{ 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete"){ 
		document.getElementById("Show_Comments_1").innerHTML=xmlHttp.responseText 
	} 
}
//============== End Home Page ===============

//============== Home Page ================
function Get_General_Comments_1(start){ 

	xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null)
	{
		alert ("Browser does not support HTTP Request")
		return
	} 
	var url="Get_General_Comments_1.php"	
	url=url+"?start="+start
	url=url+"&ram_id="+Math.random()
	xmlHttp.onreadystatechange=Get_General_Comments_1_Change
	xmlHttp.open("GET",url,true)
	xmlHttp.send(null)

}
function Get_General_Comments_1_Change() 
{ 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete"){ 
		document.getElementById("Show_Comments_2").innerHTML=xmlHttp.responseText 
	} 
}
//============== End Home Page ================

//============== Home Page ================
function Get_General_Comments_2(start){ 

	xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null)
	{
		alert ("Browser does not support HTTP Request")
		return
	} 
	var url="Get_General_Comments_2.php"	
	url=url+"?start="+start
	url=url+"&ram_id="+Math.random()
	xmlHttp.onreadystatechange=Get_General_Comments_2_Change
	xmlHttp.open("GET",url,true)
	xmlHttp.send(null)

}
function Get_General_Comments_2_Change() 
{ 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete"){ 
		document.getElementById("Show_Comments_3").innerHTML=xmlHttp.responseText 
	} 
}
//============== End Home Page ================

//==============================================================================================

function Go_Add_Reply(){ 

document.getElementById("Show_Reply_Message").innerHTML=""

var comments_id,reply_sender_name,reply_id_description
var go_flag

go_flag="YES"

comments_id=document.frm_reply.comments_id.value
reply_sender_name=document.frm_reply.reply_sender_name.value
reply_id_description=document.frm_reply.reply_id_description.value
action_action=document.frm_reply.action_action.value

	if (document.frm_reply.reply_sender_name.value==""){
		alert("Please Enter Your Name ...!");
		document.frm_reply.reply_sender_name.focus();
		go_flag="NO"
		return;
	}

	if (document.frm_reply.reply_id_description.value==""){
		alert("Please Enter Your Reply ...!");
		document.frm_reply.reply_id_description.focus();
		go_flag="NO"
		return;
	}
if (go_flag=="YES") { // go flag

	document.getElementById("Show_Reply_Message").innerHTML="<img src='images/load.gif' width='175'>"
	
	xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null)
	{
		alert ("Browser does not support HTTP Request")
		return
	} 
	
	var url="Go_Add_Reply.php"
	var parameters="comments_id="+comments_id
	parameters=parameters+"&reply_sender_name="+reply_sender_name
	parameters=parameters+"&reply_id_description="+reply_id_description
	parameters=parameters+"&action_action="+action_action
	parameters=parameters+"&ram_id="+Math.random()
	xmlHttp.onreadystatechange=Go_Add_Reply_Change
	//xmlHttp.open("GET",url,true)
	//xmlHttp.send(null)
	xmlHttp.open("POST",url,true)
      xmlHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
      xmlHttp.setRequestHeader("Content-length", parameters.length);
      xmlHttp.setRequestHeader("Connection", "close");
      xmlHttp.send(parameters);
	} // go flag
}
function Go_Add_Reply_Change() { 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete"){ 
	
		document.getElementById("Show_Reply_Message").innerHTML=xmlHttp.responseText	
		
			document.frm_reply.reply_sender_name.value=""
			document.frm_reply.reply_id_description.value=""
			var comments_id
			comments_id=document.frm_reply.comments_id.value
			//EmailBox.close()
			//
			Get_Reply(comments_id)
		//}
	} 
}

//============== Home Page ================

//============== Home Page ================

function Get_Reply(comments_id){ 

	xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null)
	{
		alert ("Browser does not support HTTP Request")
		return
	} 
	var url="Get_Reply.php"	
	url=url+"?comments_id="+comments_id
	url=url+"&ram_id="+Math.random()
	xmlHttp.onreadystatechange=Get_Reply_Change
	xmlHttp.open("GET",url,true)
	xmlHttp.send(null)

}

function Get_Reply_Change() { 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete"){ 
		document.getElementById("Show_Replies").innerHTML=xmlHttp.responseText 
		//Show_Captchya()
	} 
}
//============== End Home Page ================

//==============================================================================================

function Go_Tel_Subsc(){ 

var emailaddress,action_action,site_id
var go_flag

go_flag="YES"

emailaddress=document.frm_subscribe.emailaddress.value
site_id=document.frm_subscribe.site_id.value
action_action=document.frm_subscribe.action_action.value

	if (document.frm_subscribe.emailaddress.value==""){
		alert("Please Enter Your Emailaddress ...!");
		document.frm_subscribe.emailaddress.focus();
		go_flag="NO"
		return;
	}

	if (document.frm_subscribe.emailaddress.value=="Please enter your email address"){
		alert("Please Enter Your Emailaddress ...!");
		document.frm_subscribe.emailaddress.focus();
		go_flag="NO"	
		return;
	}

if (go_flag=="YES") { // go flag
document.getElementById("Show_Subsc_Message").innerHTML="<img src='images/load.gif' width='175'>"
	xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null)
	{
		alert ("Browser does not support HTTP Request")
		return
	} 
	
	var url="Go_Tel_Subsc.php"
	var parameters="emailaddress="+emailaddress
	parameters=parameters+"&site_id="+site_id
	parameters=parameters+"&action_action="+action_action
	parameters=parameters+"&ram_id="+Math.random()
	xmlHttp.onreadystatechange=Go_Tel_Subsc_Change
	//xmlHttp.open("GET",url,true)
	//xmlHttp.send(null)
	xmlHttp.open("POST",url,true)
      xmlHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
      xmlHttp.setRequestHeader("Content-length", parameters.length);
      xmlHttp.setRequestHeader("Connection", "close");
      xmlHttp.send(parameters);
	} // go flag
}
function Go_Tel_Subsc_Change() { 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete"){ 
		document.frm_subscribe.emailaddress.value=""
		document.getElementById("Show_Subsc_Message").innerHTML=xmlHttp.responseText		 
	} 
}

function Get_Null() { 
	if (document.frm_subscribe.emailaddress.value=="Please enter your email address") {
		document.frm_subscribe.emailaddress.value=""
	}
}

function Get_Null_1() { 
	if (document.frm_comments.comments_name.value=="Name") {
		document.frm_comments.comments_name.value=""
	}
}

function Get_Null_2() { 
	if (document.frm_comments.comments_subject.value=="Subject") {
		document.frm_comments.comments_subject.value=""
	}
}

//============== Home Page ================