function fm_findObj(n, d) { //v4.01 MM Find Obj. by Macromedia 
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
	d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=fm_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

// Change Opacity
function fm_opacity(Obj,opc){
	Obj.style.filter="alpha(opacity="+opc+")";
}

//**********************
// fm_Set Cookie
//**********************
function fm_setCookie(cname,val){
	document.cookie=cname+"="+val;
}

function fm_getCookie(cname){
	var tmpname, val="";
	// Get doc Cookie and split
	var allcookies = (document.cookie).split(";");
		// Get Value by Name
		for (var i=0;i<allcookies.length;i++){
			var tmpcname=cname;
			tmpname = allcookies[i].split("=");
			if(i>0)tmpcname=" "+cname;
			if(tmpcname==tmpname[0])val=tmpname[1];
		}
	return val;
}

function fm_divw(Obj, val){// Change InnerHTML
	var thisObj=fm_findObj(Obj);thisObj.innerHTML=val;
}


function noerr(){return true;}
window.onerror=noerr;

function fmail(){
	var x0="ferruh";var x1="mavituna";
	location.href="mail"+"to:"+x0+"@"+x1+".com?subject=ferruh.mavituna.com";
}

//Switch from between google and internal search engine
function fInt(){
	var gF = fm_findObj("gForm");
	if(document.gForm.sitesearch[1].checked)gF.action = "/";
}