	var Timer;
	
	function ScrollLeft(divimg)
	{
	  Timer = setInterval("document.getElementById('"+divimg+"').scrollLeft -= 2", 15);
	}
	
	function ScrollRight(divimg)
	{
	  Timer = setInterval("document.getElementById('"+divimg+"').scrollLeft += 2", 15);
	}


	// -- thumbnail opener  ------------------------------------------------------- //
	// -----------------------------------------------------------------------------

		
			
			function loadImage2(imageFile,index,count,height,width,title)
			{
				if (document.all&&!window.opera) {
					document.getElementById("det_img").style.filter="blendTrans(duration=1)";
					document.getElementById("det_img").filters.blendTrans.Apply();
					document.getElementById("det_img").filters.blendTrans.Play();
			  	} 
			  	$("#det_img").removeAttr("width");
			  	$("#det_img").removeAttr("height");
			  	document.getElementById("det_img").src = imageFile ;
			  
			  	$("#det_img").attr("height", height);
			  	$("#det_img").attr("width", width);
			  
			  	if(count!=""){document.getElementById("det_ind").innerHTML = "&nbsp;menampilkan gambar ke "+ index +" dari "+count+" gambar";}
			  	if(title!=""){document.getElementById("title-gallery").innerHTML = ""+title+"";}				
				
			}
			
			
//counter click
function banneraid(identity){
	$.get("adclick.php?item="+identity);
	}




	   function showfbmail(cat){
		   
                             if(cat=="fb")    
						       {
								$("#fb-connect").css("display","block");
								$("#contact").css("display","none");
								$("#contact-respon").css("display","none");
							   }
                             if(cat=="mail")    
						       {
								$("#fb-connect").css("display","none");
								$("#contact").css("display","block");
								$("#contact-respon").css("display","block");
							   }							   
						}
	
function validate() {
	if (check_input() == true) {
		var form = document.getElementById('formMail');	
		form.action = "?act=sendMail";
		form.submit();
	}
}
function CheckSearch() {
	 var form = document.getElementById('search_news');	
    	if (form.searchnews.value == "") {
		alert('Masukan kata kunci pencarian Anda!');
		form.searchnews.focus();
		return false;
	   }else {
	   return true;
	   }
	}
function CheckMail() {
	var form = document.getElementById('formMail');	
	
	if (form.name.value == "") {
		alert('Masukan nama lengkap Anda!');
		form.name.focus();
		return false;
	}
	if (form.phone.value == "") {
		alert('Masukkan nomor telpon Anda!');
		form.phone.focus();
		return false;
	}	
	

	if (form.email.value == "") {
		alert('Masukkan alamat email Anda!');
		form.email.focus();
		return false;
	}	
	
	if (form.message.value == "") {
		alert('Masukkan Pesan Anda!');
		form.message.focus();
		return false;
	}		
	

		if(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(form.email.value))
		{				
			return true;
		}
		else{
				window.alert('Silakan masukan alamat email Anda dengan benar');
				form.email.focus();
				return false;
		}	
	
		
		if (form.message.value == "") {
		alert('Masukkan pesan Anda!');
		form.message.focus();
		return false;
	}

	else return true;
	
}
