$(document).ready(function(){
		$("#error_message").hide();
	});

function checkCheckboxex(){
	isChecked= false;
	$("input[@type='checkbox']").each(function() {
		if(this.checked ==true){	isChecked=true;}
	});
				
	if(isChecked == false){
		$("#error_message").hide();
		$("#error_message").html("<strong>you must select at least one record in order to proceed with an action</strong>").slideDown("fast");
	}
	else
		$("#error_message").hide();
	return isChecked;
}



function doconfirm(){
	job=confirm("Are You Sure To Delete This Pressroom Detail Parmanently?");
	if(job!=true)
		return false;
}

var count = "255";   
function limiter(frmname,fldname){
	//var tex = document.forms[frm].elements[fld].value;
var tex = document.forms[frmname].elements[fldname].value;
var len = tex.length;

if(len > count){
        tex = tex.substring(0,count);
        document.forms[frmname].elements[fldname].value =tex;
        return false;
}
if(count-len<=0){
alert("Your Maximum Limit for this section is 255 character.");

}

}



function doMerge(form,divid,fieldname) {
	//alert(form.length);
	var inputtxt = document.getElementById(divid);
    var newPElem = document.createElement("P")
    var newInputElem = document.createElement("INPUT")
    var name_id = fieldname
	newInputElem.name = name_id
	newInputElem.type ='file'
	newInputElem.size="100" 
    newPElem.appendChild(newInputElem)
	inputtxt.appendChild(newPElem);
}



function showhide(id){ 
	if (document.getElementById){ 
		obj = document.getElementById(id); 
		if (obj.style.display == "none"){ 
				obj.style.display = ""; 
		} else { 
			obj.style.display = "none"; 
		} 
		} 
	} 


			
			
			$(document).ready(function(){
				$(".row").hover(function () {
					$(this).css({backgroundColor:"#DFF4FF"});},
					function (){
						$(this).css({backgroundColor:"transparent"});})
				;});
			$(document).ready(function(){
				$(".submenu").hide();$("#leftmenus").hide();
				$(".subcat").each(function(intIndex){
					$( this ).bind("click",function(){
						$(".submenu").not($("#link"+intIndex)).slideUp("slow");
						$("#link"+intIndex).slideDown("slow");
					})
				;});
			});
			$(document).ready(function(){
				$("#leftmenus").bind("click",function(){
					$("#showmenu").slideDown('slow');
				});
			$("#showmenu").bind("click",function(){
				$("#leftmenus").slideDown('slow');
			});
			$("#filterOptionBox").hide();
						
		});
		$(document).ready(function(){
			$(".mtitle").each(function(intIndex){
				$( this ).bind("click", function(){
					$('.quickmenu').not($("#qmenu"+ this.id )).hide();
					$("#qmenu"+this.id).slideDown("fast")
				;})
			;})
		;});
		
		
		$(document).ready(function(){
			if(screen.availWidth==1024)
				$(".right_sec").css({width:"79.5%",float:"left"});
			else if(screen.availWidth==1280)
				$(".right_sec").css({width:"83.5%",float:"left"});
				
		});



function valid(form,fieldname,msg)
{
	//alert('aaa');
//\var contents = document.FaqForm.faq_descr.value;
var contents = document.forms[form].elements[fieldname].value;
	//var contents = document.frames["wysiwyg"+fieldname].document.body.innerHTML; 
	
//var contents = document.frames[fieldname+"___Frame"].document.body.innerHTML; 

alert (contents);
	var jump = false
	if( contents.length>0 && contents != "<p>&#160;</p>")
		jump = true;
	else
	{
		alert( msg + " Required");
		jump = false;
	}
	return jump;
}


function  CheckFCK(fieldname)
{
	 var editor = FCKeditorAPI.GetInstance(fieldname );
     var contents=editor.GetHTML();

	var jump = false
if(contents.length > 0 &&contents!= "<br/>" && contents!="" && contents != "<p>&nbsp;</p>" && contents !="<br>"){

			jump = true;

}
else{
	alert('Body tekst Verplicht');

		jump = false;
}
	return jump;
	 
}