// JavaScript Document
	function countLength(a,b,c) {
    var box = document.getElementById(a);
    var divCount = document.getElementById(b);
	divCount.innerHTML = "" + box.value.length + "/"+c;
	if (box.value.length > c) {
		box.value = box.value.substring(0, c);
	}
	}
function ShowHideLayer(boxID) {
	/* Obtain reference for the selected boxID layer and its button */
	var box = document.getElementById("box"+boxID);
	var boxbtn = document.getElementById("btn"+boxID);
	/* If the selected box is currently invisible, show it */
	if(box.style.display == "none" || box.style.display=="") {
		box.style.display = "block";
 		boxbtn.src = "/images/collapse.gif";
	}
	/* otherwise hide it */
	else {
		box.style.display = "none";
		boxbtn.src = "/images/expand.gif";
	}
}


function stabs(src,unsrc){
document.getElementById(src).style.display="block";
document.getElementById(unsrc).style.display="none";

}

function mvis(src){
document.getElementById(src).style.display="block";
}
function mremovis(src){
document.getElementById(src).style.display="none";
}
function stoperror(){
return true
}



function rsscat(fid)
{

	childWindow = window.open("/rsscat.php?fid="+fid, "rsscat", "status=1,width=400,height=400,scrollbars=1,resizable=1");
    if (childWindow.opener == null) childWindow.opener = self;
    if(!childWindow.opener)
    alert('We have detected that you are using popup blocking software.\n Please disable to choose a categorie!');

}

function choosecat(fid)
{

	childWindow = window.open("/cat.php?fid="+fid, "choosecat", "status=1,width=400,height=400,scrollbars=1,resizable=1");
    if (childWindow.opener == null) childWindow.opener = self;
    if(!childWindow.opener)
    alert('We have detected that you are using popup blocking software.\n Please disable to choose a categorie!');

}




// FUNCTION SELECT ALL FIELDS
function selectAll()
{
    for (var i=0;i<document.myform.elements.length;i++)
      {
    var e = document.myform.elements[i];
    if ((e.name != 'list') && (e.type=='checkbox'))
      {
    e.checked = document.myform.list.checked;
      }
      }
}

// SMILIES
function add_emoticon(thisEmoticon)
{
	document.myform.cpost.value += ' ' + thisEmoticon + ' ';
    document.myform.cpost.focus();
}
// DISPLAY MESSAGE
function mvis2()
{
	document.getElementById("some").style.display="block";
	document.getElementById("sub").style.display="none";
	var obj = document.getElementById("some");
obj.innerHTML = "<div style='background: #fff; color: #ffffff; padding: 1px;'>&nbsp;&nbsp;&nbsp;Loading Content ...&nbsp;&nbsp;&nbsp;</div>";
}
function highlight(field) {
	field.focus();
  	field.select();
}

function toggleLayer(whichLayer, checkwhat) {									
    if (document.getElementById){					
	var style2 = document.getElementById(whichLayer).style;
	if (document.getElementById(checkwhat).checked) {							
	style2.display = "inline";							
	  }else{							
    style2.display = "none";
      }
      }				
}
function toggleLayerq(whichLayerq, checkwhatq) {									
    if (document.getElementById){					
	var style2 = document.getElementById(whichLayerq).style;
	if (document.getElementById(checkwhatq).checked) {							
	style2.display = "none";							
	  }else{							
    style2.display = "inline";
      }
      }				
}
// MENU 
    startup = function()
      {
    // fix IE layout bug
    if (document.body && document.body.clientWidth && document.body.clientWidth % 2 == 1)
      {
    window.resizeBy(1, 0);
      }
    addMouseHoverClass("nav", "sfhover");
      }
    function addMouseHoverClass(elementId, className)
      {
	var elements = document.getElementById(elementId).getElementsByTagName("LI");
	for (var i = 0; i < elements.length; i++)
	  {
	elements[i].onmouseover = function()
	  {
	this.className += " " + className;
	  }
	elements[i].onmouseout = function()
	  {
	this.className = this.className.replace(new RegExp(" " + className + "\\b"), "");
	  }
	  }
      }
    if (window.attachEvent) window.attachEvent("onload", startup);

document.write("<scr"+"ipt src='/js/datetimepicker.js'></scr"+"ipt>");
