function valUmbalko() {

	if (trim(document.frmUmbal.nama.value) == '') {
		window.alert("Kolom 'Nama' masih kosong. Mohon diisi.");
		document.frmUmbal.nama.focus();
		return false;
	}
	if (trim(document.frmUmbal.email.value) == '') {
		window.alert("Kolom 'Email' masih kosong. Mohon diisi.");
		document.frmUmbal.email.focus();
		return false;
	}
	if (document.frmUmbal.email.value.match((/(@.*@)|(\.\.)|(@\.)|(\.@)|(^\.)/)) || !(document.frmUmbal.email.value.match(/^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,4}|[0-9]{1,4})(\]?)$/))) {
		window.alert("E-mail tidak valid. Mohon diperbaiki.");
		document.frmUmbal.email.focus();
		return false;
	}
	if (trim(document.frmUmbal.alamat.value) == '') {
		window.alert("Kolom 'Alamat' masih kosong. Mohon diisi.");
		document.frmUmbal.alamat.focus();
		return false;
	}
	
	if (trim(document.frmUmbal.kota.value) == '') {
		window.alert("Kolom 'Kota' masih kosong. Mohon diisi.");
		document.frmUmbal.kota.focus();
		return false;
	}
	
	if (trim(document.frmUmbal.kodepos.value) == '') {
		window.alert("Kolom 'Kode pos' masih kosong. Mohon diisi.");
		document.frmUmbal.kodepos.focus();
		return false;
	}
		
	if (trim(document.frmUmbal.kategori.value) == '') {
		window.alert("Anda belum memilih kategori.");
		document.frmUmbal.kategori.focus();
		return false;
	}
	
	if (trim(document.frmUmbal.pertanyaan.value) == '') {
		window.alert("Kolom 'Pertanyaan' masih kosong. Mohon diisi.");
		document.frmUmbal.pertanyaan.focus();
		return false;
	}
	
	if (trim(document.frmUmbal.scode.value) == '') {
		window.alert("Kolom 'Kode sekuriti' masih kosong. Mohon diisi.");
		document.frmUmbal.scode.focus();
		return false;
	}

}

function setZIndex(){
    ct = document.getElementById("ctime").innerHTML;
    a = document.getElementById("ads").style.zIndex;
    if(a==10){ 
        document.getElementById("ads").style.zIndex='0';
    }
    else{
        document.getElementById("ads").style.zIndex='10';   
    } 
}
function kepada(a,b,c,d) 
{ 
	upitupit = new Array();
	tiputipu = new String();
	upitupit[1] = a;
	upitupit[2] = b;
	upitupit[3] = c;
	tiputipu ="%73%75%62%20%6D%20%40%20%69%6C%20%3A%20%74%6F%20%2E%20%65%63%74%20%3F";
	tiputipu = tiputipu.split(escape(" "));
	window.navigate(unescape(tiputipu[1])+"a"
			+unescape(tiputipu[3])
			+unescape(tiputipu[5])
			+unescape(tiputipu[4])
			+upitupit[3]
			+unescape(tiputipu[2])
			+upitupit[2]
			+unescape(tiputipu[6])
			+upitupit[1]
			+unescape(tiputipu[8])
			+unescape(tiputipu[0])+"j"
			+unescape(tiputipu[7])+"="+d);
}

function trim(teks) {
	teks=teks.replace(/^(\s)+/,'');
	teks=teks.replace(/(\s)+$/,'');
	return teks;
}

function valUmbal() {
	if (trim(document.frmUmbal.txtNama.value) == '') {
		window.alert("Kolom 'Nama' masih kosong. Mohon diisi.");
		document.frmUmbal.txtNama.focus();
		return false;
	}
	if (trim(document.frmUmbal.txtTelepon.value) == '') {
		window.alert("Kolom 'Telepon' masih kosong. Mohon diisi.");
		document.frmUmbal.txtTelepon.focus();
		return false;
	}
	if (trim(document.frmUmbal.txtEmail.value) == '') {
		window.alert("Kolom 'E-mail' masih kosong. Mohon diisi.");
		document.frmUmbal.txtEmail.focus();
		return false;
	}
	if (document.frmUmbal.txtEmail.value.match((/(@.*@)|(\.\.)|(@\.)|(\.@)|(^\.)/)) || !(document.frmUmbal.txtEmail.value.match(/^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,4}|[0-9]{1,4})(\]?)$/))) {
		window.alert("E-mail tidak valid. Mohon diperbaiki.");
		document.frmUmbal.txtEmail.focus();
		return false;
	}
	if (trim(document.frmUmbal.txtKomentar.value) == '') {
		window.alert("Komentar' masih kosong. Mohon diisi.");
		document.frmUmbal.txtKomentar.focus();
		return false;
	}
	if (trim(document.frmUmbal.scode.value) == '') {
		window.alert("Kode keamanan' masih kosong. Mohon diisi.");
		document.frmUmbal.scode.focus();
		return false;
	}
}

/****************************************
Submitted with modifications by Jack Routledge (http://fastway.to/compute) to DynamicDrive.com
Copyright (C) 1999 Thomas Brattli @ www.dhtmlcentral.com
This script is made by and copyrighted to Thomas Brattli 
This may be used freely as long as this msg is intact!
This script has been featured on http://www.dynamicdrive.com
****************************************
Browsercheck:*/
ie=document.all?1:0
n=document.layers?1:0
ns6=document.getElementById&&!document.all?1:0

//These are the variables you have to set:

//How much of the layer do you wan't to be visible when it's in the out state?
lshow=140;

//How many pixels should it move every step? 
var move=40;

//At what speed (in milliseconds, lower value is more speed)
menuSpeed=60

//Do you want it to move with the page if the user scroll the page?
var moveOnScroll=true

/***************************************
You should't have to change anything below this.
****************************************/
//Defining variables

var ltop;
var tim=0;

//Object constructor
function makeMenu(obj,nest){
    nest=(!nest) ? '':'document.'+nest+'.'
    if (n) this.css=eval(nest+'document.'+obj)
    else if (ns6) this.css=document.getElementById(obj).style
    else if (ie) this.css=eval(obj+'.style')						
	this.state=1
	this.go=0
        if (n) this.width=this.css.document.width
        else if (ns6) this.width=document.getElementById(obj).offsetWidth
        else if (ie) this.width=eval(obj+'.offsetWidth')
	this.left=b_getleft
    this.obj = obj + "Object"; 	eval(this.obj + "=this")	
}
//Get's the top position.
function b_getleft(){
        if (n||ns6){ gleft=parseInt(this.css.left)}
        else if (ie){ gleft=eval(this.css.pixelLeft)}
	return gleft;
}
/***********************************
Deciding what way to move the menu (this is called onmouseover, onmouseout or onclick)
************************************/
function moveMenu(){
	if(!oMenu.state){
		clearTimeout(tim)
		mIn()	
	}else{
		clearTimeout(tim)
		mOut()
	}
}
//Menu in
function mIn(){
	if(oMenu.left()>-oMenu.width+lshow){
		oMenu.go=1
		oMenu.css.left=oMenu.left()-move
		tim=setTimeout("mIn()",menuSpeed)
	}else{
		oMenu.go=0
		oMenu.state=1
	}	
}
//Menu out
function mOut(){
	if(oMenu.left()<0){
		oMenu.go=1
		oMenu.css.left=oMenu.left()+move
		tim=setTimeout("mOut()",menuSpeed)
	}else{
		oMenu.go=0
		oMenu.state=0
	}	
}
/*********************************
Checking if the page is scrolled, if it is move the menu after
**********************************/
function checkScrolled(){
	if(!oMenu.go) oMenu.css.top=eval(scrolled)+parseInt(ltop)
	if(n||ns6) setTimeout('checkScrolled()',30)
}
/*********************************
Inits the page, makes the menu object, moves it to the right place, 
show it
**********************************/
function menuInit(){
	oMenu=new makeMenu('subSlide')
	oMenu.css.left=-oMenu.width+lshow
        if (n||ns6) ltop=oMenu.css.top
        else if (ie) ltop=oMenu.css.pixelTop
	oMenu.css.visibility='visible'
	if(moveOnScroll) ie?window.onscroll=checkScrolled:checkScrolled();
}


//Initing menu on pageload
//window.onload=menuInit;
