function PopupPic(sPicURL) { 
     window.open( "popup.php?"+sPicURL, "",  
     "resizable=1,HEIGHT=200,WIDTH=200"); 
}
function PopupPicAdmin(sPicURL) { 
     window.open( "../popup.php?"+sPicURL, "",  
     "resizable=1,HEIGHT=200,WIDTH=200"); 
}

var win=null;
function NewWindow(mypage,myname,w,h,scroll,pos){
if(pos=="random"){LeftPosition=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;TopPosition=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;}
if(pos=="center"){LeftPosition=(screen.width)?(screen.width-w)/2:100;TopPosition=(screen.height)?(screen.height-h)/2:100;}
else if((pos!="center" && pos!="random") || pos==null){LeftPosition=0;TopPosition=20}
settings='width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',location=no,directories=no,status=yes,menubar=no,toolbar=no,resizable=yes';
win=window.open(mypage,myname,settings);}

//Kategori Select Box...
function filter(sCriterion){
	var coll  = document.all.buffer.options;
	var oList = document.all.list;
	var reFilter, oOption;

	oList.innerHTML = "";
	switch (sCriterion){
		case "":
			reFilter = /^$/;
			break;
		default:
			reFilter = new RegExp(sCriterion);
	}
	for (var idx=0; idx < coll.length; idx++){
		if ( reFilter.test( coll[idx].getAttribute("filter") ) ){
			oOption = new Option(coll[idx].text, coll[idx].value);
			oList.options[oList.options.length] = oOption;
		}
	}
}

function toggle(targetId){ 
  if (document.getElementById){ 
        target = document.getElementById(targetId); 
           if (target.style.display == "none"){ 
              target.style.display = "block"; 
           }else{
              target.style.display = "none"; 
           } 
     } 
} 

//Loading
function loadImages() {
if (document.getElementById) {  // DOM3 = IE5, NS6
document.getElementById('hidepage').style.visibility = 'hidden';
}
else {
if (document.layers) {  // Netscape 4
document.hidepage.visibility = 'hidden';
}
else {  // IE 4
document.all.hidepage.style.visibility = 'hidden';
      }
   }
}