function uni_changinfo(info)
		{
			for ($i=0;$i<uni_urButton.length;$i++)
			{
				document.getElementById($i).className='';
			}
			
			if (info == document.getElementById('idWeb').value)
				document.getElementById(info).className='select_tab1';
			else
				document.getElementById(info).className='select_tab';
			
			if ( uni_isArr(document.uni_form1.timnhanh.value,uni_arrContent))
			{
				document.uni_form1.timnhanh.value = uni_arrContent[info];
			}
			else if (uni_arrLoai[info]==0)
				document.uni_form1.timnhanh.focus();

			document.getElementById("info").value = info;
			
			if (uni_arrLoai[info]==1)
			{
				if (document.getElementById("uni_formvl"))
				{
					document.getElementById("uni_timviec").value = uni_infoButton[info];
					document.getElementById("uni_form1").style.display='none';
					document.getElementById("uni_formvl").style.display='';	
				}		
			}
			else 
			{
				if (document.getElementById("uni_formvl"))
				{
					document.getElementById("uni_btuSearch1").value = uni_infoButton[info];
					document.getElementById("uni_form1").style.display='';
					document.getElementById("uni_formvl").style.display='none';	
				}		
			}
			
			uni_SetCookie('uni_cTab', info, 1);
		}
			
		function uni_doSearch(info,txtS,frm)
		{
			
			var txtSearch,frmSearch;
			
			frmSearch = document.getElementById(frm);
			if (txtS == 'timnhanh')
				txtSearch = document.uni_form1.timnhanh.value;
			else
				txtSearch = document.getElementById(txtS).value;

			txtSearch = uni_trim(txtSearch);
			
			if (txtSearch.match('<'))
			{
				alert(UB_ALERT["specialkeyword"]);
				document.getElementById(txtS).focus();
				return false;
			}
			
			if ( uni_isArr(document.getElementById(txtS).value,uni_arrContent) )
			{
				alert(UB_ALERT["invalidkeyword"]);
				document.getElementById(txtS).focus();
				return false;
			}
	
			if ( (txtSearch) && (txtSearch.length > 0))
			{
				txtSearch = txtSearch;
				uni_SetCookie("uni_linkSearch", uni_urButton[info], 1);
				uni_SetCookie("uni_cKeySearch", txtSearch, 1);
				frmSearch.action = uni_urButton[info] + txtSearch;
				return true;
			}
			else
			{
				alert(UB_ALERT["invalidkeyword"]);
				document.getElementById(txtS).focus();
				return false;
			}
		}
		
		function uni_searchJob()
		{
			if (document.getElementById('tinhthanh').value)
			{
				temp1='cat';
			}
			else
			{
				temp1='all';
			}
			window.open('http://www.kiemviec.com/jobseekers/jobsearch/result/' + temp1 + '/?show=1&country=0&jobtype=000&jobstatus=00&loc=' + document.getElementById('tinhthanh').value + '&ind=' + document.getElementById('nganhnghe').value);
			return true;
		}

function uni_initValue()
{
	var uni_temp01;
	var uni_temp02;
	uni_temp01 = uni_GetCookie("uni_cTab");
	uni_temp02 = uni_GetCookie("uni_cKeySearch");
	
	if (uni_temp01)
	{	
		var uni_url_link = window.location.href;

		if (uni_GetCookie("uni_linkSearch"))
		{
			var uni_arr_link = uni_url_link.split(uni_GetCookie("uni_linkSearch")); 
			
			if (uni_arr_link[1])
			{
				uni_temp02 = uni_arr_link[1];
			}
			else
			{
				uni_temp02 = uni_arrContent[uni_temp01];
			}
			
		}
		else
		{
			uni_temp02 = uni_arrContent[uni_temp01];
		}
		
		
	}
	else
	{
		uni_temp01 = document.getElementById("info").value;
		if (!uni_temp02)
			uni_temp02 = document.getElementById("strContentWeb").value;
	}
	
	document.uni_form1.timnhanh.value = decodeURIComponent(uni_temp02);
	uni_changinfo(uni_temp01);
}

function uni_isArr(strS,arrA)
{
	var i;
	for (i=0;i<arrA.length;i++)
		if (strS == arrA[i]) return true;
	return false;
}

function uni_focus_textsearch()
{
	if ( uni_isArr(document.uni_form1.timnhanh.value,uni_arrContent) )
	{
		document.uni_form1.timnhanh.value = '';
	}
	else
	{
		if (document.uni_form1.timnhanh.value == '')
		{	
			var uni_temp01;
			var uni_temp02;
			uni_temp01 = uni_GetCookie("uni_cTab");
			if (uni_temp01)
			{	
				uni_temp02 = uni_arrContent[uni_temp01];
			}
			else
			{
				uni_temp02 = document.getElementById("strContentWeb").value;
			}
			
			document.uni_form1.timnhanh.value = uni_temp02;
		}
	}
	return true;
}

function uni_focus_textsearch2(strInputDefaultValue)
{
	var strCurrentValue = document.getElementById('uni_txtSearch2').value;
	if(strCurrentValue == strInputDefaultValue)
	{
		document.getElementById('uni_txtSearch2').value='';
	}
	else if( strCurrentValue == '')
	{
		document.getElementById('uni_txtSearch2').value = strInputDefaultValue;
	}
	return true;
}

function uni_lienhe()
{
	var UB_intHeight, UB_intWidth, UB_strOption, UB_intCenterTop, UB_intCenterLeft;
	UB_intWidth  = 515;
	UB_intHeight = 405;
	UB_intCenterTop  = (screen.height - UB_intHeight)/2;
    UB_intCenterLeft = (screen.width - UB_intWidth)/2;
    UB_strOption = "width=" + UB_intWidth + ", height=" + UB_intHeight + ",scrollbars=0,resizable=no,menubar=no, location=no, status=no, titlebar=no, toolbar=no, top=" + UB_intCenterTop +", left=" + UB_intCenterLeft;
	window.open(UB_LIENHE,"LienHe",UB_strOption);
}

function uni_stripPHP( str )
{
	str = str.replace(/<\?php/g,"");
	str = str.replace(/<\?/g,"");
	str = str.replace(/\?>/g,"");

	return str;
}

function uni_trim( str )
{ 

	return str.replace(/^\s+|\s+$/g,"");
}

function uni_loadVar()
{
	document.getElementById('txtSearch1').value = arrContent[0];
	document.getElementById('txtSearch2').value = arrContent[0];
	var collapse_banner = new animatedcollapse_banner("banner_ad", 200, false);
	var p = false ;
	var t;
	var collapse_tatcadv = new animatedcollapse_tcdv("link", 200, false);
	var h = false ;
	var tg;
}

function uni_pausecomp(millis)
{
	var date = new Date();
	var curDate = null;
	do { curDate = new Date(); }
	while(curDate-date < millis);
} 

function uni_GetCookie(namecookie){ 
	var re=new RegExp(namecookie+"=[^;]+", "i"); //construct RE to search for target name/value pair
	if (document.cookie.match(re)) //if cookie found
		return document.cookie.match(re)[0].split("=")[1]; //return its value
	return "";
}

function uni_SetCookie(namecookie, valuecookie, days){
	if (typeof days!="undefined"){ //if set persistent cookie
		var expireDate = new Date();
		var expstring=expireDate.setDate(expireDate.getDate()+days);
		document.cookie = namecookie+"="+valuecookie+"; expires="+expireDate.toGMTString();
	}
	else //else if this is a session only cookie
		document.cookie = namecookie+"="+valuecookie;
}