		function funval()
		{
			if (document.frmdiwaniya.txtname.value == "")
			{
				alert("Please Enter Owner Name!")
				document.frmdiwaniya.txtname.focus()
				return false;
			}
			if (document.frmdiwaniya.txtlocation.value == "")
			{
				alert("Please Enter The Location!")
				document.frmdiwaniya.txtlocation.focus()
				return false;
			}
			if (document.frmdiwaniya.txtdiw.value == "")
			{
				alert("Please Enter Diwaniya Name!")
				document.frmdiwaniya.txtdiw.focus()
				return false;
			} 
				if (document.frmdiwaniya.selectday.value == "")
			{
				alert("Please Select The Day!")
				document.frmdiwaniya.selectday.focus()
				return false;
				} 
				if (document.frmdiwaniya.txttime.value == "")
			{
				alert("Please Enter The Time!")
				document.frmdiwaniya.txttime.focus()
				return false;
				} 
			user_input = ""
			for (i=0;i<document.frmdiwaniya.radioarea.length;i++)
			{
				if (document.frmdiwaniya.radioarea[i].checked)
				{
					user_input = document.frmdiwaniya.radioarea[i].value;
				}
			}
			if (user_input =="")
			{
				alert("Please Select Area!");
				return false;
			}	
				return true;
			}
function FontSize()
    {
        if (document.getElementById('newsdesc').style.fontSize == 'large')
        {
            //document.getElementById('aFontSize').innerHTML = '<span>تكبير الخط</span>';
            document.getElementById('newsdesc').style.fontSize='14px';
            document.getElementById('newsdesc').style.lineHeight='20px';
            document.getElementById('aFontSize').style.textIndent='10px';
            // do for spaces...
        }
        else
        {
            //document.getElementById('aFontSize').innerHTML = '<span>تصغير الخط</span>';
            document.getElementById('newsdesc').style.fontSize='large';
            document.getElementById('newsdesc').style.lineHeight='30px';
           // document.getElementById('aFontSize').style.textIndent='20px';
        }
    }
function checkContact(){
    if (document.frmContact.txtname.value=="")
    {
      alert("Please Enter Name " );
      document.frmContact.txtname.focus();
      return false;
    }
 if (document.frmContact.txtemail.value=="")
    {
      alert("Please enter your Email Id" );
      document.frmContact.txtemail.focus();
      return false;
    }
 if (invalidemail(document.frmContact.txtemail.value))
    {
  
  alert("Please enter a proper email address");
       document.frmContact.txtemail.focus();
       return false;
    }
	 if (document.frmContact.txtsubject.value=="")
    {
      alert("Please enter subject" );
      document.frmContact.txtsubject.focus();
      return false;
    }
	 if (document.frmContact.txtcomments.value=="")
    {
      alert("Please enter comments" );
      document.frmContact.txtcomments.focus();
      return false;
    }
//form1.submit();
}
function checkAdv(){
    if (document.frmContact.txtname.value=="")
    {
      alert("Please Enter Name " );
      document.frmContact.txtname.focus();
      return false;
    }
 if (document.frmContact.txtemail.value=="")
    {
      alert("Please enter your Email Id" );
      document.frmContact.txtemail.focus();
      return false;
    }
 if (invalidemail(document.frmContact.txtemail.value))
    {
  
  alert("Please enter a proper email address");
       document.frmContact.txtemail.focus();
       return false;
    }
	 if (document.frmContact.txtsubject.value=="")
    {
      alert("Please select banner place" );
      document.frmContact.txtsubject.focus();
      return false;
    }
	 if (document.frmContact.txtcomments.value=="")
    {
      alert("Please enter comments" );
      document.frmContact.txtcomments.focus();
      return false;
    }
//form1.submit();
}
function checkQAform(){
    if (document.frmQA.category.value=="")
    {
      alert("Please Select Category " );
      document.frmQA.category.focus();
      return false;
    }
    if (document.frmQA.txttitle.value=="")
    {
      alert("Please Enter Title " );
      document.frmQA.txttitle.focus();
      return false;
    }
 if (document.frmQA.txtemail.value=="")
    {
      alert("Please enter your Email Id" );
      document.frmQA.txtemail.focus();
      return false;
    }
 if (invalidemail(document.frmQA.txtemail.value))
    {
  
  alert("Please enter a proper email address");
       document.frmQA.txtemail.focus();
       return false;
    }
	 if (document.frmQA.txtcontent.value=="")
    {
      alert("Please enter Content" );
      document.frmQA.txtcontent.focus();
      return false;
    }
//form1.submit();
}
function invalidemail(s)
{
  res=0;
  len=s.length;

   for(i=0;i<len;i++)
     { 
       if(s.charAt(i)=='@' )
	 
   for(j=i;j<len;j++)
            {
              if(s.charAt(j)=='.')
                  res=1;
	
             }
     }  
if (res==0)
    return true; 
  else
     return false; 
   
}
function show_hide(div) {
 if(document.getElementById(div).style.display=='none') {
  document.getElementById(div).style.display='';
  } else {
  document.getElementById(div).style.display='none';
    }
  }
var min=8;
var max=18;
function increaseFontSize() {
 
	var content = document.getElementById('newsdesc');
 
      if(content.style.fontSize) {
         var s = parseInt(content.style.fontSize.replace("px",""));
         var lineh = parseInt(content.style.lineHeight.replace("px",""));
      } else {
 
         var s = 14;
		 var lineh = 20;
      }
      if(s!=max) {
 
         s += 1;
         lineh += 2;
      }
      content.style.fontSize = s+"px"
      content.style.lineHeight= lineh+"px";
 
}
function defaultFontSize() {
	var content = document.getElementById('newsdesc');
      content.style.fontSize = "14px";
      content.style.lineHeight='20px';
}
function decreaseFontSize() {
	var content = document.getElementById('newsdesc');
 
      if(content.style.fontSize) {
         var s = parseInt(content.style.fontSize.replace("px",""));
         var lineh = parseInt(content.style.lineHeight.replace("px",""));
      } else {
 
         var s = 12;
		 var lineh = 20;
      }
      if(s!=min) {
 
         s -= 1;
         lineh -= 1;
      }
      content.style.fontSize = s+"px"
      content.style.lineHeight= lineh+"px";
 
}
