// JavaScript Document
function local()
{
	document.getElementById("login_form").submit(); 
	
}
function submit_form_foto()
{
	document.getElementById('sortir').submit(); 
}
function submit_form(nama_form)
{
	var nama=nama_form;
		alert("Apakan anda yakin dengan jawaban");
		
		document.getElementById(nama).submit(); 
}
function fb()
{
	u=location.href;t=document.title;window.open('http://www.facebook.com/sharer.php?u='+encodeURIComponent(u)+'&t='+encodeURIComponent(t),'sharer','toolbar=0,status=0,width=626,height=436');
	return false;
	
}
function twitter()
{
	u=location.href;t=document.title;window.open('http://twitter.com/home?status=Currently reading'+encodeURIComponent(u)+'&t='+encodeURIComponent(t),'sharer','toolbar=0,status=0,width=626,height=436');
	return false;
}
function hashtag()
{
	String.prototype.parseHashtag = function() {
	return this.replace(/[#]+[A-Za-z0-9-_]+/, function(t) {
		var tag = t.replace("#","%23")
		return t.link("http://search.twitter.com/search?q="+tag);
	});
};
test = "Simon is writing a post about #twitter and parsing hashtags as URLs";
document.writeln(test.parseHashtag());

}
function textCounter(field, countfield, maxlimit) {
if (field.value.length > maxlimit) // if too long...trim it!
field.value = field.value.substring(0, maxlimit);
// otherwise, update 'characters left' counter
else 
countfield.value = maxlimit - field.value.length;
}

function button_foto_share()
{
	var a;
	a=document.getElementById("form_share_email");
	if(a.style.visibility=='visible'){
	a.style.visibility='hidden';
	}else
	{
		a.style.visibility='visible';
	}
	//alert(a.style.visibility);
}