function textCounter(field, countfield, maxlimit) {

	if (field.value.length > maxlimit)

		field.value = field.value.substring(0, maxlimit);

	else

		countfield.value = maxlimit - field.value.length;

}

	

function request(c,s_c,mid,pid,cty,cid,parentId,obj,obj2){
	
	var comment_post = new Div_("comRes");
	//data = "comment="+c.value+"&security_code="+s_c.value+"&mid="+mid.value+"&contentType="+cty.value+"&contentId="+cid.value+"&parentId="+parentId.value+"&pid="+pid.value;

	//document.getElementById(obj).innerHTML="<img src='image/wait.gif' >"; 

	comment_post.ChangeContent('./include/rateRequest.php', Form.GetVariable('com'));
	document.getElementById('checkDup').value=0;
	//ajaxFunction(url,obj,obj2);

}



function hide_dob() {

	

	//alert(document.getElementById('gender').value);

	

	if(document.getElementById('gender').value == 'C') {

		document.getElementById('div_dob').style.visibility = 'hidden';

		document.getElementById("div_name").innerHTML = "Company Name";

		document.getElementById('div_lname').style.visibility = 'hidden';

		

	} 

	

	else if (document.getElementById('gender').value == 'A') {

		document.getElementById('div_dob').style.visibility = 'hidden';

		document.getElementById("div_name").innerHTML = "Band or Artist Name";

		document.getElementById('div_lname').style.visibility = 'hidden';

		

	}

	

	else { 

		

		document.getElementById('div_dob').style.visibility = 'visible';

		document.getElementById("div_name").innerHTML = "First Name";

		document.getElementById('div_lname').style.visibility = 'visible';

		

	}

}





function ReverseContentDisplay(d) {



            alert("====");



if(d.length < 1) { return; }



if(document.getElementById(d).style.display == "none") { document.getElementById(d).style.display = "block"; }



else { document.getElementById(d).style.display = "none"; }



}





	function selstar(val,val2){

		for(var x=1;x<=val2;x++)

			document.getElementById(val+x).src="image/icone_rating_over.png";	

		//document.['i'+x].src="image/star2.gif";

	}

	function remstar(val,val2){

		//val2 = val2.value;

		for(var x=1;x<=5;x++){

			if(val2>=1){

				document.getElementById(val+x).src="image/icone_rating_full.png";

         			val2=val2-1;

                }

                else if(val2>=0.5){

					document.getElementById(val+x).src="image/icone_rating_full.png";

                	val2=val2-1;

                }

                else if (val2<0.5 && val2>0){

					document.getElementById(val+x).src="image/icone_rating_empty.png";

                	val2=val2-1;

                }

                else if(val2<=0){

					document.getElementById(val+x).src="image/icone_rating_empty.png";

                }

		}

			

		//document['i'+x].src="image/star"+val2+".gif";

	}

	

	function setrate(r){
		//var rating = new Tab_(obj2);
		//document.starRating.rating.value=val;

		//document.rate.submit();

		//url = "include/starRatingRequest.php?rating="+r+"&mid="+mid.value+"&contentType="+cty.value+"&contentId="+cid.value+"&colName="+col.value;
		
		//document.getElementById(obj1).innerHTML='<img src=image/wait.gif >';

		//rating.OnClick(this, './include/starRatingRequest.php', "rating="+r+"&mid="+mid.value+"&contentType="+cty.value+"&contentId="+cid.value+"&colName="+col.value);
		
		var rating = new Div_("rbar2");
		
		Form.SetValue('rate', 'rating', r);
		rating.ChangeContent('./include/starRatingRequest.php', Form.GetVariable('rate'));
		//ajaxFunction(url,obj1,obj2);

	}

	

// Function to Confirm before a delete operation in the admin

function confirm_delete()

{

  if (confirm("Are you sure you want to delete?")==true)

    return true;

  else

    return false;

}	



// Function to Confirm before a delete operation in the admin

function confirm_approve()

{

  if (confirm("Are you sure you want to Approve?")==true)

    return true;

  else

    return false;

}	



// Function to Confirm before a delete operation in the admin

function confirm_deny()

{

  if (confirm("Are you sure you want to Deny?")==true)

    return true;

  else

    return false;

}	
