
var checkflag = "false";
function check(field) {

if (checkflag == "false") {
for (i = 0; i < field.length; i++) {
field[i].checked = true;}
checkflag = "true";
return "Uncheck All"; }
else {
for (i = 0; i < field.length; i++) {
field[i].checked = false; }
checkflag = "false";
return "Check All"; }
}

function checkAll(checkname, exby) {
  for (i = 0; i < checkname.length; i++)
  checkname[i].checked = exby.checked? true:false
}


//<a href="#" onClick="printpage(); return false">Print Me!</a>
function printpage() {
	if (window.print) {
		window.print();
	} else {
		alert('To print this page, select Print from the file menu.');
	}
}


function disableButton(theButton)
{
 theButton.value="Processing...";
 theButton.disabled = true;
 //theButton.form.submit();
  return true; 
}


function CloseWin() {
if (this && !this.closed)  {
	setTimeout("this.close()",1500)
	}// close small window and depart
window.opener.location.reload();
}


function ConfirmDelete(url)
  {
    if (confirm("Are you sure you want to delete this?"))
    {
      document.location = url;
    }
  }

function ConfirmClick(url, message)
  {
    if (confirm(message))
    {
      document.location = url;
    }
  }
  

function fnShowHide(uid,moretext,lesstext)
    {
		var o = document.getElementById( uid );
		
		if( o.style.display == "none" )
		{
			o.style.display = "";
			el = document.getElementById('more' + uid);
			el.innerHTML = unescape(lesstext);
			//alert(unescape(lesstext));
		}
		else
		{
			o.style.display = "none";
			el = document.getElementById('more' + uid);
			el.innerHTML = unescape(moretext);
			//alert(unescape(moretext));
			//alert('more' + uid);
		}
		return;
}


function showDiv( uid )
    {
		var o = document.getElementById( uid );
		
		if( o.style.display == "none" )
		{
			o.style.display = "";
		//el = document.getElementById('more' + uid);
		//el.innerHTML = '-';
			
		}
		else
		{
			o.style.display = "none";
		//	el = document.getElementById('more' + uid);
		//	el.innerHTML = '+';
		}
		return;
}

function link_prefill()
{
    // see http://www.thesitewizard.com/archive/navigation.shtml
    // for an explanation of this script and how to use it on your
    // own site

    newurl = document.getElementById('link').value;
    listid = document.getElementById('listid').value;

    var baseurl = "showlist.php?listid=" +  listid + "&link=" + newurl + "&#editlist";
    
    //selecteditem = menuform.newurl.selectedIndex ;
   //newurl = document.getElementById('link').value;
    if (newurl.length != 0) {
      location.href = baseurl;
    }
}


function DynamiciFrame(url)
{
document.write('<iframe name="rssbox"  id="rssbox" src="' + url +  '" width="500" height="350" scrolling="auto" frameborder="0">[Your user agent does not support frames or is currently configured not to display frames.]</iframe>');

}