form = new Array();
form['f'] = new Array();
form['b'] = new Array();

form['f'][1] = "#eeffee";
form['f'][2] = "#0096ff solid 1px";
form['f'][3] = "1px";
form['f'][4] = "#ffffff";

form['b'][1] = "#ffffdd";
form['b'][2] = "#bbbbbb solid 1px";
form['b'][3] = "3px";
form['b'][4] = "#aaaaaa";

var strSearch = "Pencarian...";

function changeStyle(target,code){
	/*if (target.value == "" && target.name=="searchword"){
		target.value = strSearch;
		target.style.color 	= form[code][4];
	} else*/ if (target.value == strSearch && target.name=="searchword"){
		target.value = "";
		target.style.color 	= "#000000";
	}
	target.style.background = form[code][1];
	target.style.border     = form[code][2];
	targer.style.padding    = form[code][3];
	
	
}
function changeValSrc(taget,cond){
	//target.value = val;
	if (target.value == ""){
		target.value = strSearch;
	} else if (target.value == "Pencarian..."){
		target.value = "";
	}
}
function onLoad(){
	var forms = document.getElementsByTagName('input');
	for (i = 0; i < forms.length; i++) {
		if (forms[i].getAttribute("type")) {
			var type = forms[i].getAttribute("type");
			//if (type == "text" || type == "password") {
				
				//if(forms[i].getAttribute("name")=="searchword"){
			forms[i].onfocus = function (){
				changeStyle(this,'f');
				//changeValSrc(this,'f');
			};
			forms[i].onblur = function (){
				changeStyle(this,'b');
				//changeValSrc(this,'b');
			};
				/*} else {

					forms[i].onfocus = function (){ changeStyle(this,'f'); };
					forms[i].onblur = function () { changeStyle(this,'b'); };
					
				}*/
			//}
			
		}
	}
/*	var searchbox = getElementById("mod_search_searchword");
		searchbox.onfocus = function (){
			changeStyle(this,'f');
			//if(forms[i].value == "Pencarian..."){
				searchbox.value == "";
			//}
		};
		searchbox.onblur = function (){
			changeStyle(this,'b');
			if(searchbox.value == ""){
				searchbox.value == strSearch;
			}
		};*/
}