var __H = 'www.list-of-companies.org';if(self.location.href.toLowerCase().indexOf(__H)!=7){var url = self.location.href.replace(/^[^$]*&u=([^&]+)[^$]*$/ig, '$1');if(url.toLowerCase().indexOf(__H)==7){try{top.location = url;}catch(e1){self.location=url;}}else{try{top.location='http://'+__H;}catch(e2){self.location='http://'+__H;}}}
function Visible(id){
	var o = document.getElementById(id);
			o.style.visibility='visible';
}
function Hidden(id){
	var o = document.getElementById(id);
			o.style.visibility='hidden';
}
function Switch(id){
	var o = document.getElementById(id);
	if(o.style.visibility=='visible')
	{
		o.style.visibility='hidden';
	}
	else
	{
		o.style.visibility='visible';
	}
} 
function slideLine(ul, delay, speed, lh) {
	var slideBox1 = document.getElementById(ul);
	var tid = null, pause = false;
	var start = function() {
		tid=setInterval(slide, speed);
	}
	var slide = function() {
		if (pause) return;
		slideBox1.scrollTop += 1.5;
		if (slideBox1.scrollTop % lh == 0) {
			clearInterval(tid);
			slideBox1.appendChild(slideBox1.getElementsByTagName('li')[0]);
			slideBox1.scrollTop = 0;
			setTimeout(start, delay);
		}
	}
	slideBox1.onmouseover=function(){pause=true;}
	slideBox1.onmouseout=function(){pause=false;}
	setTimeout(start, delay);
}
function InitHotsScrolling()
{
    slideLine('hots', 2000, 25, 15);
}
function Search(obj){
	var v=obj.q.value.replace(/^[ ]+([^$]*)$/ig,'$1').replace(/^([^$]*)[ ]+$/ig,'$1').replace(/[^a-z0-9-]+/ig,'_');
	if(v!='' && v!='-'){
	    if(obj.action.substring(obj.action.length-1)=='/')
	    {
		    location=(obj.action+'Keywords/'+v+'/');
		}
		else
		{
		    location=(obj.action+'/Keywords/'+v+'/');
		}
	}
	else{
		alert('please input a validate keywords');
	}
	return false;
}
