var nama_bulan = new Array("Jan","Feb","Mar","Apr","Mei","Jun","Jul","Aug","Sep","Oct","Nov","Dec");
function cek(jml,obj) {
	tmp = obj.value;
	if(tmp.length>(jml-1)) {
		return false;
	}
}

function jump(a) {
		url = "photo_gallery.php?cat="+a;
		window.location.href=url;
}

function subscribe() {
	pola = /\w+\S*@\S+\.\S+/;
	email = document.newsletter.email.value;
	if(!(pola.test(email))) { 
		alert("Invalid email address");		
	} else {
		document.newsletter.email.value = "";
		url = "subscribe.php?email="+email;
		width =300;
		height = 200;
		win_name = "terserah";
		CLOSEdwn 		= "images/close_dwn.gif"	<!-- image mouse down exit button -->
		CLOSEup 		= "images/close_ovr.gif"	<!-- image mouse up exit button -->
		CLOSEovr 		= "images/close_ovr.gif"	<!-- image mouse over exit button -->
		MINIdwn 		= "images/mini_dwn.gif"	<!-- ga tau yg ini mah -->
		MINIup 			= "images/mini_ovr.gif"	<!-- ga tau yg ini mah -->
		MINIovr 		= "images/mini_ovr.gif"	<!-- ga tau yg ini mah -->
		NONEgrf 		= "images/spacer.gif"	<!-- spacer image -->
		CLOCKgrf		= "images/clock.gif"	<!-- image ditampilkan disaat loading, setelah itu hidden(set ada di function setLAYOUT -->
		titHTML 	    	= "<font face=verdana size=2 color=#ffffff> <strong>.:: WYNNE PRAKUSYA  &nbsp; [Newsletter] .::</strong></font>" 		<!-- teks pada title window -->
		titWIN			= "WYNNE PRAKUSYA" 		<!-- teks pada ie di status bar-->
		winBORDERCOLOR   	= "#1D5C01"  		<!-- warna border window -->
		winBORDERCOLORsel	= "#1D5C01"		<!-- warna border window on mouse drag-->
		winBGCOLOR    		= "#1D5C01" 		<!-- warna pada title window -->
		winBGCOLORsel 		= "#1D5C01" 		<!-- warna on press pada title window -->
		mywin = openchromeless(url, win_name, width, height, NONEgrf, CLOSEdwn, CLOSEup, CLOSEovr, MINIdwn, MINIup, MINIovr, CLOCKgrf, titHTML, titWIN, winBORDERCOLOR, winBORDERCOLORsel, winBGCOLOR, winBGCOLORsel)
	}
}

function contact_submit() {
	error_message= "ERROR MESSAGE\n";
	kirim = true;
	pola = /\w+\S*@\S+\.\S+/;
	nama = document.contact.nama.value;
	email = document.contact.email.value;
	pesan = document.contact.pesan.value;	
	if(nama=="") {
		error_message += "Please fill your name\n";
		kirim = false;
	}
	if(!(pola.test(email))) { 
		error_message+="Invalid email address\n";
		kirim = false;
	} 
	if(pesan=="") {
		error_message += "Please fill your message";
		kirim = false;
	}
	if(!kirim) {
		alert(error_message);
	} else {
		document.contact.submit();
	}


}
