/* verify form send to a friend */
function input_verify_teman()
{

	if (document.form1.txtUName.value =='')
        {
		alert("Harap isi Nama anda");
		document.form1.txtUName.focus();
		return;
		}


	if (document.form1.txtName.value =='')
        {
		alert("Harap isi Nama Teman anda");
		document.form1.txtName.focus();
		return;
		}



	if (document.form1.txtEmail.value =='')
        {
		alert("Harap isi Email Teman anda");
		document.form1.txtEmail.focus();
		return;
		}

	if (document.form1.txtPesan.value=='')
		{
		alert("Harap isi Pesan anda");
		document.form1.txtPesan.focus();
		return ;
		}


	document.form1.submit();
}


/* clear default value of search web keyword text box */
function clearkeyword(){
	if (document.searchform.keyword.value == " - search -")
	    document.searchform.keyword.value = "";
}

function toggleImg(imgId, newImg)
 {
   if(document.images)
     document.images[imgId].src = eval(newImg + '.src')
 }
 
var arrow=0
 
function showarrow(what,what2){
	if (what.style.display=='none'){
	  if (arrow == 0) {		  
		  arrow = what;
		} else {		  
		  toggleImg(what2,'dir1')
		  arrow.style.display = 'none'
		  arrow = what
	  }
		what.style.display='';
		toggleImg(what2,'dir1o')    
	}
	else{
		what.style.display='none'
		toggleImg(what2,'dir1')
	}
}
 
var flagdirect=0
var flagtenant=0
  
function showhide(what,what2,level){  
   
	if (what.style.display=='none'){
	   
	  if (level == 0){	    
	    
  		if (flagdirect == 0) {		  
  		  flagdirect = what;
  		} else {
  		  flagdirect.style.display = 'none'
  		  flagdirect = what
  	  }
  	}
  	else if(level == 1) {  	  
  	   
  	  if (flagtenant == 0) {		  
  		  flagtenant = what;
  		} else {
  		  flagtenant.style.display = 'none'
  		  flagtenant = what
  	  }
  	}
		what.style.display='';
		
	}
	else{
		what.style.display='none'		
	}
}



function showMore(what,what2){
	if (what.style.display=='none'){
		what.style.display='';		
		toggleImg(what2,'more1o')    
	}
	else{
		what.style.display='none'		
		toggleImg(what2,'more1')
	}
}


function popwindow(strURL,wname)
{
	win = window.open (strURL ,wname,'location=no,status=no,directories=no,menubar=no,scrollbars=no,resizable=no,width=620,height=320');
	win.focus();
	win.moveTo(0,0);
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}