/*This style sheet id only for users.In which we define following function..*/
/*
1. function openSmallUploadForm(code);--for add_products.php

2. function openlogoUploadForm(code);--for add_products.php

3. function check_form(); -------------for add_products.php

4. function addRow();------------------for add_products.php

5. function removeRow(src);------------for add_products.php

6. function check_show_form();------------for tvshowAdd.php

7. function check_dstr_form(); -------------for distributorAdd.php

8. function check_opr_form(); -------------for operatorAdd.php

9.function check_dstr_edit_form();---------for distributorEdit.php

10.function check_reward_form();---------for rewardAdd.php

11.function check_news_form();---------for addNews.php

12.function check_color_form();---------for addColor.php



*/
//Image Upload code for category

function openUploadForm(code,dir){
var smallwin=window.open("","smallWindow","Width=400, height=150");
smallwin.document.open();
smallwin.document.writeln('<html><head><title>Image Upload</title></head><body bgcolor=#59BA47><form name="upload" action="function/uploading.php" method="POST" ENCTYPE="multipart/form-data"><input type=hidden name=returnURL value='+smallwin.opener.location+'> <INPUT TYPE=HIDDEN NAME="CODE" VALUE="'+code+'"><input type="hidden" name="DIRECTORY" value="'+dir+'">  <input type="file" name="file" size="30" maxlength=200 class="show_button"><input type="submit" value="Upload!" class="show_button"></form></body></html>');
}

//Image Upload code for thumb/LargeImage

function openimageUploadForm(code,dir){
var logowin=window.open("","logoWindow","Width=400, height=150");
logowin.document.open();
logowin.document.writeln('<html><head><title>Big Image Upload</title></head><body bgcolor=#59BA47><form name="upload" action="function/upload_pics.php" method="POST" ENCTYPE="multipart/form-data"> <input type=hidden name=returnURL value='+logowin.opener.location+'> <INPUT TYPE=HIDDEN NAME=CODE VALUE="'+code+'">  <input type="file" name="file" size="30" maxlength=200>	  <input type="hidden" name="DIRECTORY" value="'+dir+'">	  <input type="submit" value="Upload!">    </form></body></html>');
}


//Image Upload code for thumb/LargeImage

function openprofileimageUploadForm(code,dir){
var logowin=window.open("","logoWindow","Width=400, height=150");
logowin.document.open();
logowin.document.writeln('<html><head><title>Big Image Upload</title></head><body bgcolor=#59BA47><form name="upload" action="function/profile_img_uploading.php" method="POST" ENCTYPE="multipart/form-data"> <input type=hidden name=returnURL value='+logowin.opener.location+'> <INPUT TYPE=HIDDEN NAME=CODE VALUE="'+code+'">  <input type="file" name="file" size="30" maxlength=200>	  <input type="hidden" name="DIRECTORY" value="'+dir+'">	  <input type="submit" value="Upload!">    </form></body></html>');
}


//check category addition


function category_add_form()
             {
		
   /*  var count_bug=0;
	var focus_field = '';	
	var tmp_arr = document.getElementsByTagName("div");
	for(var i = 0; i < tmp_arr.length; i++)
	{
		if(tmp_arr[i].className == "texterror")
		{
			 tmp_arr[i].innerHTML = "&nbsp;";
		}
	}

	if(document.catfrm.name.value=='')
				 {
    document.getElementById('catname').innerHTML ="<img src='../images/error_icon.gif'>&nbsp;Enter Category Name";
    if(focus_field=='') focus_field = 'name';
			       count_bug+=1;
				 }
				 
				 if(document.catfrm.c_code.value=='')
				 {
                   document.getElementById('cat_code').innerHTML ="<img src='../images/error_icon.gif'>&nbsp;Enter Category Code (Max length 3)";
				   if(focus_field=='') focus_field = 'c_code';
			       count_bug+=1;
				 }else{					 
                  document.getElementById('cat_code').innerHTML ="&nbsp;";
				  count_bug=0;
				 }*/

var code=document.catfrm.c_code.value;
var code_len=code.length;

               if(code_len < 2)
				 {
				   alert("Enter Category Code (Min length 2)");
				   return false;
                   /*document.getElementById('cat_code').innerHTML ="<img src='../images/error_icon.gif'>&nbsp;Enter Category Code (Max length 3)";
				   if(focus_field=='') focus_field = 'c_code';
				   count_bug+=1;*/
				 }
				  /*else{					 
                 document.getElementById('cat_code').innerHTML ="&nbsp;";
				  count_bug=0;
				 }
*/
	/*if(count_bug >0)
		return false;
	else
		return true;*/

			 }




//check category 
//Check add_product.php form

function check_categoryform()
             {
     var count_bug=0;
	var focus_field = '';	
	var tmp_arr = document.getElementsByTagName("div");
	for(var i = 0; i < tmp_arr.length; i++)
	{
		if(tmp_arr[i].className == "texterror")
		{
			 tmp_arr[i].innerHTML = "&nbsp;";
		}
	}
/*For category Validation*/
	if(document.catselectfrm.category.value==0)
				 {
                   document.getElementById('cat_name').innerHTML ="<img src='../images/error_icon.gif'>&nbsp;Select Your Category";
				   if(focus_field=='') focus_field = 'category';
			       count_bug+=1;
				 }else{					 
                  document.getElementById('cat_name').innerHTML ="&nbsp;";
				  count_bug=0;
				 }


	


	if(count_bug >0)
		return false;
	else
		return true;

			 }







//Check add_product.php form

function check_form()
             {
     var count_bug=0;
	var focus_field = '';	
	var tmp_arr = document.getElementsByTagName("div");
	for(var i = 0; i < tmp_arr.length; i++)
	{
		if(tmp_arr[i].className == "texterror")
		{
			 tmp_arr[i].innerHTML = "&nbsp;";
		}
	}
/*For category Validation*/
	/*if(document.prdfrm.category.value==0)
				 {
                   document.getElementById('cat_name').innerHTML ="<img src='../images/error_icon.gif'>&nbsp;Select Your Category";
				   if(focus_field=='') focus_field = 'category';
			       count_bug+=1;
				 }else{					 
                  document.getElementById('cat_name').innerHTML ="&nbsp;";
				  count_bug=0;
				 }*/


	/* For Product Name Validation*/

	if(document.prdfrm.pname.value=="")
				 {
                   document.getElementById('prd_name').innerHTML ="<img src='../images/error_icon.gif'>&nbsp;Product Name can't empty";
				   if(focus_field=='') focus_field = 'pname';
			       count_bug+=1;
				 }else{					 
                  document.getElementById('prd_name').innerHTML ="&nbsp;";
				   count_bug=0;
				 }

/* For Product Offer Validation*/

                  get_radio_value();
               
/* For Product Price Validation*/
		 	if(document.prdfrm.pricenet.value=="")
				 {
                   document.getElementById('prd_price').innerHTML ="<img src='../images/error_icon.gif'>&nbsp;Product Price can't empty";
				   if(focus_field=='') focus_field = 'pricenet';
			       count_bug+=1;
				 }else{					 
                  document.getElementById('prd_price').innerHTML ="&nbsp;";
				   count_bug=0;
				 }



	if(count_bug >0)
		return false;
	else
		return true;

			 }

function get_radio_value()
{
var	count_bug=1;
for (var i=0; i < document.prdfrm.offer.length; i++)
   {
   if (document.prdfrm.offer[i].checked)
      {
      var rad_val = document.prdfrm.offer[i].value;
	    if((rad_val=='Yes')&&(document.prdfrm.percentage.value==""))
					 {				
              document.getElementById('offer_name').innerHTML ="<img src='../../images/error_icon.gif'>&nbsp;Please Enter Your Offer Rate";
			if(focus_field=='') focus_field = 'percentage';
			  count_bug+=1;
				  
			}
		else{					 
             document.getElementById('offer_name').innerHTML ="&nbsp;";
			count_bug=0;
			return true;
			}
	  
      }
   }
}

function isNumberKey(evt,enabledot)
{
	if(!enabledot) enabledot=0;
 var charCode = (evt.which) ? evt.which : event.keyCode
	 //alert(charCode)
 if (charCode > 31 && (charCode < 48 || charCode > 57) && charCode!=46 && enabledot==1)
	return false;
 else if (charCode > 31 && (charCode < 48 || charCode > 57) && enabledot==0)
	return false;

 return true;
}

//////////////////////Checkform for addproduct Ends herer////////////////


///////////Adding Dynamic row in addproduct.php for size,color,quantity starts here////////////
var art_id=1;
var art_idt=1;
var art_ids=1;
function addRow(){
	                 art_id+=1;
					//add a row to the rows collection and get a reference to the newly added row
					var newRow = document.all("rawGrid").insertRow();

					//add 7 cells (<td>) to the new row and set the innerHTML to contain text boxes
							

					var oCell = newRow.insertCell();
					oCell.innerHTML = "<td width=30% align=left ><input type=text class='gradient' name='prdsize"+art_id+"' size=10></td></td>";

					var oCell = newRow.insertCell();
					oCell.innerHTML = "<td width=30% align=left ><input type=text class='gradient' name='prdcolor"+art_id+"' size=10 id=cname"+art_id+" onkeyup=\"getid(this.id);Tip('<table border=0 bordercolor=#59BA46 width=100><tr bgcolor=white style=border:1px solid black><td><div id=search_suggest></div></tr></td></table>');searchSuggest('name',this.id,1);\"></td>";

					var oCell = newRow.insertCell();
					oCell.innerHTML = "<td width=30% align=left ><input type=text class='gradient' name='prdqty"+art_id+"' size=10></td>";

					
					oCell = newRow.insertCell();
					oCell.innerHTML = "<td align=center width=10%><a href='#null' class='add'  onclick='removeRow(this);'>Delete</a></td>";
					document.prdfrm.total_item.value=art_id;

}

///////////Adding Dynamic row in addproduct.php for size,color,quantity Ends here////////////

///////////Removing Dynamic row in addproduct.php for size,color,quantity starts here////////////

function removeRow(src)
			{
				
				var oRow = src.parentElement.parentElement;	
				document.all("rawGrid").deleteRow(oRow.rowIndex);		
								
			}

///////////Removing Dynamic row in addproduct.php for size,color,quantity Ends here////////////



//

//Check add_product.php form

function check_curform()
             {
				 
     var count_bug=0;
	var focus_field = '';	
	var tmp_arr = document.getElementsByTagName("div");
	for(var i = 0; i < tmp_arr.length; i++)
	{
		if(tmp_arr[i].className == "texterror")
		{
			 tmp_arr[i].innerHTML = "&nbsp;";
		}
	}
/*For category Validation*/
	if((document.curfrm.CurrencyType.value==0)||(document.curfrm.CurrencyValue.value==0)||(document.curfrm.CurrencySymbol.value==0))
				 {
                   document.getElementById('cur_msg').innerHTML ="<img src='../images/error_icon.gif'>&nbsp;You Can not empty any field";
				   if(focus_field=='') focus_field = 'CurrencyType';
			       count_bug+=1;
				 }


	



	if(count_bug >0)
		return false;
	else
		return true;

			 }


			 //check tvshowAdd.php form

			 function check_show_form()
             {
     var count_bug=0;
	var focus_field = '';	
	var tmp_arr = document.getElementsByTagName("div");
	for(var i = 0; i < tmp_arr.length; i++)
	{
		if(tmp_arr[i].className == "texterror")
		{
			 tmp_arr[i].innerHTML = "&nbsp;";
		}
	}
/*For channel name Validation*/
	if(document.show_form.channel_name.value=="")
				 {
                   document.getElementById('div_cname').innerHTML ="<img src='../images/error_icon.gif'>&nbsp;Insert Chaneel Name";
				   if(focus_field=='') focus_field = 'channel_name';
			       count_bug+=1;
				 }else{					 
                  document.getElementById('div_cname').innerHTML ="&nbsp;";
				  count_bug=0;
				 }
/*For channel logo Validation*/
				 if(document.show_form.imaget.value=="")
				 {
                   document.getElementById('div_clogo').innerHTML ="<img src='../images/error_icon.gif'>&nbsp;Insert Chaneel Logo";
				   if(focus_field=='') focus_field = 'imaget';
			       count_bug+=1;
				 }else{					 
                  document.getElementById('div_clogo').innerHTML ="&nbsp;";
				  count_bug=0;
				 }

/*For telecasting time from Validation*/
				 if(document.show_form.time_from.value=="")
				 {
                   document.getElementById('div_time_from').innerHTML ="<img src='../images/error_icon.gif'>&nbsp;Insert Time From";
				   if(focus_field=='') focus_field = 'time_from';
			       count_bug+=1;
				 }else{					 
                  document.getElementById('div_time_from').innerHTML ="&nbsp;";
				  count_bug=0;
				 }

/*For telecasting time to Validation*/
				 if(document.show_form.time_to.value=="")
				 {
                   document.getElementById('div_time_to').innerHTML ="<img src='../images/error_icon.gif'>&nbsp;Insert Time To";
				   if(focus_field=='') focus_field = 'time_to';
			       count_bug+=1;
				 }else{					 
                  document.getElementById('div_time_to').innerHTML ="&nbsp;";
				  count_bug=0;
				 }
	

	if(count_bug >0)
		return false;
	else
		return true;

			 }


			 //Check changePwd.php form

function pwd_changeForm()
             {
			
     var count_bug=0;
	var focus_field = '';	
	var tmp_arr = document.getElementsByTagName("div");
	for(var i = 0; i < tmp_arr.length; i++)
	{
		if(tmp_arr[i].className == "texterror")
		{
			 tmp_arr[i].innerHTML = "&nbsp;";
		}
	}

	if(document.change_pwdform.txiUserId.value!=document.change_pwdform.uid.value)
				 {
                   document.getElementById('userid_msg').innerHTML ="<img src='../images/error_icon.gif'>&nbsp;Sorry Wrong User Id";
				   if(focus_field=='') focus_field = 'txiUserId';
			       count_bug+=1;
				 }
if(document.change_pwdform.txiPassword.value!=document.change_pwdform.oldpass.value)
				 {
                   document.getElementById('pass_msg').innerHTML ="<img src='../images/error_icon.gif'>&nbsp;Sorry Wrong Password";
				   if(focus_field=='') focus_field = 'txiPassword';
			       count_bug+=1;
				 }
/*For new paswword Validation*/
	if(document.change_pwdform.txtPwd.value=="")
				 {
                   document.getElementById('div_pwd').innerHTML ="<img src='../images/error_icon.gif'>&nbsp;Please insert new password";
				   if(focus_field=='') focus_field = 'txtPwd';
			       count_bug+=1;
				 }

	 if(document.change_pwdform.txtrePwd.value=="")
				 {
                   document.getElementById('div_re_pwd').innerHTML ="<img src='../images/error_icon.gif'>&nbsp;Please re-type new password";
				   if(focus_field=='') focus_field = 'txtrePwd';
			       count_bug+=1;
				 }

				  if(document.change_pwdform.txtrePwd.value != document.change_pwdform.txtPwd.value)
				 {
                   document.getElementById('div_re_pwd').innerHTML ="<img src='../images/error_icon.gif'>&nbsp;Re-type password mismatched";
				   if(focus_field=='') focus_field = 'txtrePwd';
			       count_bug+=1;
				 }


	if(count_bug >0)
		return false;
	else
		return true;

			 }


//distributorAdd.php
function check_dstr_form()
             {
				 
     var count_bug=0;
	var focus_field = '';	
	var tmp_arr = document.getElementsByTagName("div");
	for(var i = 0; i < tmp_arr.length; i++)
	{
		if(tmp_arr[i].className == "texterror")
		{
			 tmp_arr[i].innerHTML = "&nbsp;";
		}
	}

	if(document.dstrfrm.comp_name.value=="")
				 {
                   document.getElementById('compname').innerHTML ="<img src='../images/error_icon.gif'>&nbsp;Please Enter Company / Store Name";
				   if(focus_field=='') focus_field = 'comp_name';
			       count_bug+=1;
				 }

	if(document.dstrfrm.dname.value=="")
				 {
                   document.getElementById('dstr_name').innerHTML ="<img src='../images/error_icon.gif'>&nbsp;Please Enter Vendor Name";
				   if(focus_field=='') focus_field = 'dname';
			       count_bug+=1;
				 }

	if(document.dstrfrm.address.value=="")
				 {
                   document.getElementById('dstr_address').innerHTML ="<img src='../images/error_icon.gif'>&nbsp;Please Enter Vendor Address";
				   if(focus_field=='') focus_field = 'address';
			       count_bug+=1;
				 }
   if(document.dstrfrm.city.value=="")
				 {
                   document.getElementById('dstr_city').innerHTML ="<img src='../images/error_icon.gif'>&nbsp;Please Enter City Name";
				   if(focus_field=='') focus_field = 'city';
			       count_bug+=1;
				 }

  if(document.dstrfrm.state.value=="")
				 {
                   document.getElementById('dstr_state').innerHTML ="<img src='../images/error_icon.gif'>&nbsp;Please Enter State Name";
				   if(focus_field=='') focus_field = 'state';
			       count_bug+=1;
				 }
if(document.dstrfrm.contact_no.value=="")
				 {
                   document.getElementById('dstr_contact_no').innerHTML ="<img src='../images/error_icon.gif'>&nbsp;Please Enter Contact No";
				   if(focus_field=='') focus_field = 'contact_no';
			       count_bug+=1;
				 }

/*if(document.dstrfrm.mail.value=="")
				 {
                   document.getElementById('dstr_mail').innerHTML ="<img src='../images/error_icon.gif'>&nbsp;Please Enter Email Id";
				   if(focus_field=='') focus_field = 'mail';
			       count_bug+=1;
				 }*/
if(document.dstrfrm.mail.value!="")
				 {
apos=document.dstrfrm.mail.value.indexOf("@");
dotpos=document.dstrfrm.mail.value.lastIndexOf(".");
if (apos<1||dotpos-apos<2) 
				 {
                   document.getElementById('dstr_mail').innerHTML ="<img src='../images/error_icon.gif'>&nbsp;Please Enter Valid Email Id";
				   if(focus_field=='') focus_field = 'mail';
			       count_bug+=1;
				 }
				 }

/*if(document.dstrfrm.user_id.value=="")
				 {
                   document.getElementById('dstr_user_id').innerHTML ="<img src='../images/error_icon.gif'>&nbsp;Please Enter User Id";
				   if(focus_field=='') focus_field = 'user_id';
			       count_bug+=1;
				 }
if(document.dstrfrm.pwd.value=="")
				 {
                   document.getElementById('dstr_pwd').innerHTML ="<img src='../images/error_icon.gif'>&nbsp;Please Enter Password";
				   if(focus_field=='') focus_field = 'pwd';
			       count_bug+=1;
				 }*/
	if(count_bug >0)
		return false;
	else
		return true;

			 }
/////////////////////////////////////////////////////////////////////////////////////

//distributorEdit.php
function check_dstr_edit_form()
             {
				 
     var count_bug=0;
	var focus_field = '';	
	var tmp_arr = document.getElementsByTagName("div");
	for(var i = 0; i < tmp_arr.length; i++)
	{
		if(tmp_arr[i].className == "texterror")
		{
			 tmp_arr[i].innerHTML = "&nbsp;";
		}
	}

	if(document.dstrfrm.dname.value=="")
				 {
                   document.getElementById('dstr_name').innerHTML ="<img src='../images/error_icon.gif'>&nbsp;Please Enter Distributor Name";
				   if(focus_field=='') focus_field = 'dname';
			       count_bug+=1;
				 }

	if(document.dstrfrm.address.value=="")
				 {
                   document.getElementById('dstr_address').innerHTML ="<img src='../images/error_icon.gif'>&nbsp;Please Enter Distributor Address";
				   if(focus_field=='') focus_field = 'address';
			       count_bug+=1;
				 }
   if(document.dstrfrm.city.value=="")
				 {
                   document.getElementById('dstr_city').innerHTML ="<img src='../images/error_icon.gif'>&nbsp;Please Enter City Name";
				   if(focus_field=='') focus_field = 'city';
			       count_bug+=1;
				 }

  if(document.dstrfrm.state.value=="")
				 {
                   document.getElementById('dstr_state').innerHTML ="<img src='../images/error_icon.gif'>&nbsp;Please Enter State Name";
				   if(focus_field=='') focus_field = 'state';
			       count_bug+=1;
				 }
if(document.dstrfrm.contact_no.value=="")
				 {
                   document.getElementById('dstr_contact_no').innerHTML ="<img src='../images/error_icon.gif'>&nbsp;Please Enter Contact No";
				   if(focus_field=='') focus_field = 'contact_no';
			       count_bug+=1;
				 }

if(document.dstrfrm.mail.value=="")
				 {
                   document.getElementById('dstr_mail').innerHTML ="<img src='../images/error_icon.gif'>&nbsp;Please Enter Email Id";
				   if(focus_field=='') focus_field = 'mail';
			       count_bug+=1;
				 }
if(document.dstrfrm.mail.value!="")
				 {
apos=document.dstrfrm.mail.value.indexOf("@");
dotpos=document.dstrfrm.mail.value.lastIndexOf(".");
if (apos<1||dotpos-apos<2) 
				 {
                   document.getElementById('dstr_mail').innerHTML ="<img src='../images/error_icon.gif'>&nbsp;Please Enter Valid Email Id";
				   if(focus_field=='') focus_field = 'mail';
			       count_bug+=1;
				 }
				 }
	if(count_bug >0)
		return false;
	else
		return true;

			 }
////////////////////////////////////////////////////////////////////////////////////////
//operatorAdd.php
function check_opr_form()
             {
				 
     var count_bug=0;
	var focus_field = '';	
	var tmp_arr = document.getElementsByTagName("div");
	for(var i = 0; i < tmp_arr.length; i++)
	{
		if(tmp_arr[i].className == "texterror")
		{
			 tmp_arr[i].innerHTML = "&nbsp;";
		}
	}
if(document.dstrfrm.user_name.value=="")
				 {
                   document.getElementById('dstr_user_name').innerHTML ="<img src='../images/error_icon.gif'>&nbsp;Please Enter Operator Name";
				   if(focus_field=='') focus_field = 'user_name';
			       count_bug+=1;
				 }
	
if(document.dstrfrm.user_id.value=="")
				 {
                   document.getElementById('dstr_user_id').innerHTML ="<img src='../images/error_icon.gif'>&nbsp;Please Enter User Id";
				   if(focus_field=='') focus_field = 'user_id';
			       count_bug+=1;
				 }
if(document.dstrfrm.pwd.value=="")
				 {
                   document.getElementById('dstr_pwd').innerHTML ="<img src='../images/error_icon.gif'>&nbsp;Please Enter Password";
				   if(focus_field=='') focus_field = 'pwd';
			       count_bug+=1;
				 }
	if(count_bug >0)
		return false;
	else
		return true;

			 }



















////////////////////////////////////////////////////////////////////////////////////////
//rewardAdd.php
function check_reward_form()
             {
				 
     var count_bug=0;
	var focus_field = '';	
	var tmp_arr = document.getElementsByTagName("div");
	for(var i = 0; i < tmp_arr.length; i++)
	{
		if(tmp_arr[i].className == "texterror")
		{
			 tmp_arr[i].innerHTML = "&nbsp;";
		}
	}
if(document.frm.r_number.value=="")
				 {
                   document.getElementById('div_r_number').innerHTML ="<img src='../images/error_icon.gif'>&nbsp;Please Enter Reward Number";
				   if(focus_field=='') focus_field = 'r_number';
			       count_bug+=1;
				 }
	
if(document.frm.per_rs.value=="")
				 {
                   document.getElementById('div_per_rs').innerHTML ="<img src='../images/error_icon.gif'>&nbsp;Please Enter Per Rs";
				   if(focus_field=='') focus_field = 'per_rs';
			       count_bug+=1;
				 }
if(document.frm.per_$.value=="")
				 {
                   document.getElementById('div_per_$').innerHTML ="<img src='../images/error_icon.gif'>&nbsp;Please Enter Per $";
				   if(focus_field=='') focus_field = 'per_$';
			       count_bug+=1;
				 }
	if(count_bug >0)
		return false;
	else
		return true;

			 }
	///////////////////////////////





	///////////////////////////////


	function selectAll(selectBox,selectAll)
{
	// have we been passed an ID
	
	if (typeof selectBox == "string") 
	{
		selectBox = document.getElementById(selectBox);		
	}
	// is the select box a multiple select box?
	if (selectBox.type == "select-multiple")
	{
		for (var i = 0; i < selectBox.options.length; i++)
		{
			selectBox.options[i].selected = selectAll;
		}
	}
}

////////////////////////////////////////////////////////////

////Function for displaying size chart//////////////////

function ncustom(){
document.getElementById('custom').style.display = "block";
}

function no_need_custom(){
document.getElementById('custom').style.display = "none";
}


////Function for displaying Wash Care//////////////////

function fetchwashcare(){
document.getElementById('washcaretd').style.display = "block";
}

function disclswashcare(){
document.getElementById('washcaretd').style.display = "none";
}


////Function for displaying Profile Images//////////////////

function fetchszchart(){
document.getElementById('szcharttd').style.display = "block";
}

function disclsszchart(){
document.getElementById('szcharttd').style.display = "none";
}


//addNews.php
function check_news_form()
             {
				 
     var count_bug=0;
	var focus_field = '';	
	var tmp_arr = document.getElementsByTagName("div");
	for(var i = 0; i < tmp_arr.length; i++)
	{
		if(tmp_arr[i].className == "texterror")
		{
			 tmp_arr[i].innerHTML = "&nbsp;";
		}
	}

	if(document.prdfrm.txttitle.value=="")
				 {
                   document.getElementById('div_title').innerHTML ="<img src='../images/error_icon.gif'>&nbsp;Please Enter News Title";
				   if(focus_field=='') focus_field = 'txttitle';
			       count_bug+=1;
				 }

	if(count_bug >0)
		return false;
	else
		return true;

			 }

//addColor.php
function check_color_form()
             {
				 
     var count_bug=0;
	var focus_field = '';	
	var tmp_arr = document.getElementsByTagName("div");
	for(var i = 0; i < tmp_arr.length; i++)
	{
		if(tmp_arr[i].className == "texterror")
		{
			 tmp_arr[i].innerHTML = "&nbsp;";
		}
	}

	if(document.colfrm.txtname.value=="")
				 {
                   document.getElementById('div_name').innerHTML ="<img src='../images/error_icon.gif'>&nbsp;Please Enter Color Name";
				   if(focus_field=='') focus_field = 'txtname';
			       count_bug+=1;
				 }
if(document.colfrm.txthexa.value=="")
				 {
                   document.getElementById('div_hexa').innerHTML ="<img src='../images/error_icon.gif'>&nbsp;Please Enter Hexadecimal Value";
				   if(focus_field=='') focus_field = 'txthexa';
			       count_bug+=1;
				 }
	if(count_bug >0)
		return false;
	else
		return true;

			 }

/*****************************************************************************************************************************************************/
//                    Map Form Checking 
/****************************************************************************************************************************************************/
function map_form()
             {
		
   var count_bug=0;
	var focus_field = '';	
	var tmp_arr = document.getElementsByTagName("div");
	for(var i = 0; i < tmp_arr.length; i++)
	{
		if(tmp_arr[i].className == "texterror")
		{
			 tmp_arr[i].innerHTML = "&nbsp;";
		}
	}

	
				 
				 if(document.mapfrm.category.value=='0')
				 {
                   document.getElementById('cat_msg').innerHTML ="<img src='../images/error_icon.gif'>&nbsp;Chose Category ";
				   if(focus_field=='') focus_field = 'category';
			       count_bug+=1;
				 }else{					 
                  document.getElementById('cat_msg').innerHTML ="&nbsp;";
				  count_bug=0;
				 }


	if(count_bug >0)
		return false;
	else
		return true;

			 }

//emailAdd.php
function check_email_form()
             {
				 
     var count_bug=0;
	var focus_field = '';	
	var tmp_arr = document.getElementsByTagName("div");
	for(var i = 0; i < tmp_arr.length; i++)
	{
		if(tmp_arr[i].className == "texterror")
		{
			 tmp_arr[i].innerHTML = "&nbsp;";
		}
	}

	if(document.emailfrm.department.value=="")
				 {
                   document.getElementById('depart').innerHTML ="<img src='../images/error_icon.gif'>&nbsp;Please Enter Department Name";
				   if(focus_field=='') focus_field = 'department';
			       count_bug+=1;
				 }

	if(document.emailfrm.email.value=="")
				 {
                   document.getElementById('e_mail').innerHTML ="<img src='../images/error_icon.gif'>&nbsp;Please Enter EmailId";
				   if(focus_field=='') focus_field = 'email';
			       count_bug+=1;
				 }

	
	if(count_bug >0)
		return false;
	else
		return true;

			 }
/////////////////////////////////////////////////////////////////////////////////////
