function editContactUs(){
	
	/*var description='';
	if(editor){
		var description =  tinyMCE.get('description').getContent()
	}else{
		description = document.getElementById("description").value
	}
	description = htmlEntitis(description);
	for(i=0; i< description.length; i++){
		description = description.replace("#", ";;;")
	}
	
	xmlhttp = checkBrwser()
	if(xmlhttp){
		xmlhttp.onreadystatechange=function(){
			if(xmlhttp.readyState==4){
				document.getElementById("editDataDiv").style.visibility='hidden'
				document.getElementById("loadDiv").style.visibility='hidden'
			}else{
				requestNotReady()
			}
		}
		xmlhttp.open("GET",wwwroot+'ajax/?module=contant_mass&action=editContactUs&description='+description, true)
		xmlhttp.send(null)
	}*/
	document.getElementById('contactUsFrm').submit();
}

function stopContactUs(){
	document.getElementById("editDataDiv").style.visibility='hidden'
	document.getElementById("loadDiv").style.visibility='hidden'
}


function viewContactUs(){
	xmlhttp = checkBrwser()
	if(xmlhttp){
		xmlhttp.onreadystatechange=function(){
			if(xmlhttp.readyState==4){
				document.getElementById("mainData").innerHTML=unescape(xmlhttp.responseText)
				document.getElementById("loadDiv").style.visibility='hidden'
			}else{
				requestNotReady()
			}
		}
		xmlhttp.open("GET",wwwroot+'ajax/?module=contant_mass&action=viewContactUs', true)
		xmlhttp.send(null)
	}
}

function subscribeNow(){
	xmlhttp = checkBrwser()
	if(xmlhttp){
		xmlhttp.onreadystatechange=function(){
			if(xmlhttp.readyState==4){
				document.getElementById("subscription").innerHTML=xmlhttp.responseText
				document.getElementById("loadDiv").style.visibility='hidden'
			}else{
				requestNotReady()
			}
		}
		xmlhttp.open("GET",wwwroot+'ajax/?module=contant_mass&action=subscribeNow&email='+document.getElementById("email").value, true)
		xmlhttp.send(null)
	}
}

function massEmail(){
	xmlhttp = checkBrwser()
	if(xmlhttp){
		xmlhttp.onreadystatechange=function(){
			if(xmlhttp.readyState==4){
				document.getElementById("editDataDiv").style.visibility='hidden'
				document.getElementById("loadDiv").style.visibility='hidden'
			}else{
				requestNotReady()
			}
		}
		xmlhttp.open("GET",wwwroot+'ajax/?module=contant_mass&action=mass_email&description='+document.getElementById("contact_us").value, true)
		xmlhttp.send(null)
	}
}

function sendMassEmail(){
	xmlhttp = checkBrwser()
	if(xmlhttp){
		xmlhttp.onreadystatechange=function(){
			if(xmlhttp.readyState==4){
				document.getElementById("loadDiv").style.visibility='hidden'
			}else{
				document.getElementById("editDataDiv").style.visibility='hidden'
				requestNotReady()
			}
		}
		xmlhttp.open("GET",wwwroot+'ajax/?module=contant_mass&action=sendMassEmail&message='+document.getElementById("massEmail").value+"&subject="+document.getElementById("subject").value, true)
		xmlhttp.send(null)
	}
}

function stopContactUs(msg){
	document.getElementById("msgContactUs").innerHTML=msg
	document.getElementById("sendButton").innerHTML=''
}
