// JavaScript Document

<!--
var varshow = 1;
var varshow2 = 0;
function toggleBox(szDivID, iState) // 1 visible, 0 hidden
{
   var obj = document.layers ? document.layers[szDivID] :
   document.getElementById ?  document.getElementById(szDivID).style :
   document.all[szDivID].style;
   obj.visibility = document.layers ? (iState ? "show" : "hide") :
   (iState ? "visible" : "hidden");
}

function show(member,login)
{
  if(varshow == 1 && varshow2 == 0  )
  {
  toggleBox(member,0);
  toggleBox(login,1);
  varshow = 0 ;
  varshow2 = 1;
  }
  else
  {
  toggleBox(member,1);
  toggleBox(login,0);
  varshow = 1 ;
  varshow2 = 0 ;
  }

}
// -->


function quickGo(list)
    {var item=list.options[list.selectedIndex].value;
    if (item!="#") {
    location.href=item;
    }}

function spawn_window(content,spawn,sizing)
{window.open(content,spawn,sizing);}

function startPop(PopEvent)
  {
    var desktop=window.open(PopEvent,"_blank","toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,width=600,height=350,resizable");
  }


function startPopEvent(PopEvent)
  {
    var desktop=window.open(PopEvent,"_blank","toolbar=yes,location=yes,status=yes,menubar=yes,scrollbars=yes,width=600,height=350,resizable");
  }

function goPopup(url,wdth,hght){
window.open(url,'popup','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=' + wdth + ',height=' + hght +',framemargin=0 leftmargin=0 topmargin=0 marginwidth=0 marginheight=0');
}



function returnit(what,whatword){
if (document.getElementById(what).value==''){
document.getElementById(what).value=whatword;
}
}


function setuserBlock1  (theTarget,theContent,theVisibility){
document.getElementById('MR1').className = 'c_userBlock_1';
document.getElementById('MR2').className = 'c_userBlock_2';
document.getElementById('MR3').className = 'c_userBlock_3';
document.getElementById(theTarget).className = 'c_userBlock_Over';

document.getElementById('c_userBlock_mostRead1').style.display = 'none';
document.getElementById('c_userBlock_mostRead2').style.display = 'none';
document.getElementById('c_userBlock_mostRead3').style.display = 'none';
document.getElementById(theContent).style.display = 'inline';

}	



//Input fields
function dynoStdFields(theTarget,searchText,setBack){
var checkItem = document.getElementById(theTarget).value;
if(checkItem == searchText){
 document.getElementById(theTarget).value = "";
}
if(setBack == "setBack"){
if(checkItem == "" || checkItem == " "){
 document.getElementById(theTarget).value = searchText;
}
}
}


sfHover = function() {
	var sfEls = document.getElementById("nav").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" sfhover";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);

$( function() {
  $('.pagination > a').live('click', function() {
    $('#answers_container').load($(this).attr('href'));
    document.location.href = '#top_paging';
    return false;
  });
});

