var head__height = 30;
var content__height = 250;


function createStyleRule(_1,_2){
	if(!document.getElementsByTagName||!(document.createElement||document.createElementNS)){
		return;
	}
	var _3=navigator.userAgent.toLowerCase();
	var _4=((_3.indexOf("msie")!=-1)&&(_3.indexOf("opera")==-1));
	var _5=(_4&&(_3.indexOf("win")!=-1));
	var _6=(_4&&(_3.indexOf("mac")!=-1));
	if(_6){
		return;
	}
	var _7=document.getElementsByTagName("head")[0];
	var _8=(typeof document.createElementNS!="undefined")?document.createElementNS("http://www.w3.org/1999/xhtml","style"):document.createElement("style");
	if(!_5){
		var _9=document.createTextNode(_1+" {"+_2+"}");
		_8.appendChild(_9);
	}
	_8.setAttribute("type","text/css");
	_8.setAttribute("media","screen");
	_7.appendChild(_8);
	if(_5&&document.styleSheets&&document.styleSheets.length>0){
		var _a=document.styleSheets[document.styleSheets.length-1];
		if(typeof _a.addRule=="object"){
			_a.addRule(_1,_2);
		}
	}
}

createStyleRule("#listings","display:none;");

function cssjs(a,o,c1,c2){
	switch(a){
		case "swap":
			o.className=!cssjs("check",o,c1)?o.className.replace(c2,c1):o.className.replace(c1,c2);
			break;
		case "add":
			if(!cssjs("check",o,c1)){
				o.className+=o.className?" "+c1:c1;
			}
			break;
		case "remove":
			var _f=o.className.match(" "+c1)?" "+c1:c1;
			o.className=o.className.replace(_f,"");
			break;
		case "check":
			return new RegExp("\\b"+c1+"\\b").test(o.className);
			break;
	}
}

function camelize(_10){
	var _11=_10.split("-");
	if(_11.length==1){
		return _11[0];
	}
	var _12=_10.indexOf("-")==0?_11[0].charAt(0).toUpperCase()+_11[0].substring(1):_11[0];
	for(var i=1,len=_11.length;i<len;i++){
		var s=_11[i];
		_12+=s.charAt(0).toUpperCase()+s.substring(1);
	}
	return _12;
}

function setStyle(_15,_16){
	for(var _17 in _16){
		_15.style[camelize(_17)]=_16[_17];
	}
}

function cleanWhitespace(_18){
	for(var i=0;i<_18.childNodes.length;i++){
		var _1a=_18.childNodes[i];
		if(_1a.nodeType==3&&!/\S/.test(_1a.nodeValue)){
			_1a.parentNode.removeChild(_1a);
		}
	}
}
function createCookie(_1b,_1c,_1d){
var _1e;
if(_1d){
var _1f=new Date();
_1f.setTime(_1f.getTime()+(_1d*24*60*60*1000));
_1e="; expires="+_1f.toGMTString();
}else{
_1e="";
}
document.cookie=_1b+"="+_1c+_1e+"; OanGlobal.com; path=/";
}
function readCookie(_20){
var _21=_20+"=";
var ca=document.cookie.split(";");
for(var i=0;i<ca.length;i++){
var c=ca[i];
while(c.charAt(0)==" "){
c=c.substring(1,c.length);
}
if(c.indexOf(_21)==0){
return c.substring(_21.length,c.length);
}
}
return null;
}
function eraseCookie(_25){
createCookie(_25,"",-1);
}
var last=[];
var delayTimeout;
function loadSearchPreference(){
if(document.getElementById("search")){
var e=document.getElementById("search").engine;
e[0].onfocus=function(){
createCookie("search","pages",30);
};
e[1].onfocus=function(){
createCookie("search","people",30);
};
if(readCookie("search")=="people"){
e[1].checked=true;
}else{
e[0].checked=true;
}
}
}
function initHome(_27){
	var _28=document.getElementById("listings");
	setStyle(_28,{display:"block"});
	cleanWhitespace(_28);
	pruneByTagName(_28,"LI");
	pruneByTagName(_28,"LI");
	_28=_28.childNodes;
	var _29;
	for(var i=0;i<_28.length;++i){
		_29=_28[i];
		cssjs("add",_29,"closed");
		setStyle(_29,{height:head__height+"px"});/*----head height---*/
			YAHOO.util.Event.addListener(_29,"mouseover",beginDelayedCollapse);
			YAHOO.util.Event.addListener(_29,"mouseout",cancelDelayedCollapse);
	}
	var _2b=randomFilter(_28.length,_27);
	beginCollapse(_28[_2b].id);
	loadSearchPreference();
}

function pruneByTagName(_2c,_2d){
	for(var i=0;i<_2c.childNodes.length;++i){
		var _2f=_2c.childNodes[i];
		if(_2f.tagName!=_2d){
			_2f.parentNode.removeChild(_2f);
		}
	}
}

function randomFilter(_30,_31){
	var _32=Math.floor(Math.random()*_30);
	for(var i=0;i<_31.length;i++){
		if(_31[i]==_32){
			return randomFilter(_30,_31);
		}
	}
	return _32;
}

function beginDelayedCollapse(e){
	cssjs("add",this,"active");
	delayTimeout=setTimeout("beginCollapse('"+this.id+"');",300);
}

function cancelDelayedCollapse(e){
	if(cssjs("check",this,"closed")){
		cssjs("remove",this,"active");
	}
	clearTimeout(delayTimeout);
}

function beginCollapse(id){
	var _37=document.getElementById(id);
	last.push(_37);
	if(last.length>3){
		last.shift();
	}
	var _38=true;
	var _39=last[(last.length)-2];
	if(last.length===1){
		_38=false;
	}else{
		if(_39===last[(last.length)-1]){
			_38=false;
		}
	}
	if(_38==true){
		cssjs("remove",_39,"active");
		cssjs("add",_39,"closed");
		cssjs("remove",_37,"closed");
		cssjs("add",_37,"active");
		myAnim=new Tween(_37.style,_39.style,"height",Tween.regularEaseOut,head__height,content__height,1.0,"px"); /*----content hieght----*/
		myAnim.start();
	}else{
		if(cssjs("check",_37,"closed")){
			cssjs("remove",_37,"closed");
			cssjs("add",_37,"active");
			myAnim=new Tween(_37.style,null,"height",Tween.regularEaseOut,head__height,content__height,1.0,"px"); /*----content hieght----*/
			myAnim.start();
		}
	}
}

function initHomeLegacy(_3a){
var _3b;
var _3c=document.getElementById("listings");
setStyle(_3c,{display:"block"});
cleanWhitespace(_3c);
pruneByTagName(_3c,"LI");
pruneByTagName(_3c,"LI");
_3c=_3c.childNodes;
var _3d;
var _3e;
var _3f;
var _40;
for(var i=0;i<_3c.length;++i){
_3d=_3c[i];
oDivs=_3d.getElementsByTagName("div");
_3e=oDivs[0];
oText=oDivs[1];
oImage=_3d.getElementsByTagName("img")[0];
oAnchors=_3d.getElementsByTagName("a");
oSkip=oAnchors[(oAnchors.length-1)];
setStyle(_3e,{display:"none"});
setStyle(_3d,{height:head__height+"px"});
cssjs("add",_3d,"closed");
oImage.style.display="none";
oText.style.marginTop="0px";
_3e.style.backgroundRepeat="no-repeat";
_3e.style.backgroundImage="url("+oImage.src+")";
oSkip.style.display="none";
_3d.onmouseover=beginCollapseLegacyWrapper;
}
var _42=randomFilter(_3c.length,_3a);
beginCollapseLegacy(_3c[_42].id);
loadSearchPreference();
}
function beginCollapseLegacyWrapper(){
beginCollapseLegacy(this.id);
}
function beginCollapseLegacy(id){
var _44=document.getElementById(id);
var _45;
last.push(_44);
if(last.length>3){
last.shift();
}
var _46=true;
var _47=last[(last.length)-2];
if(last.length===1){
_46=false;
}else{
if(_47===last[(last.length)-1]){
_46=false;
}
}
if(_46==true){
cssjs("remove",_47,"active");
cssjs("add",_47,"closed");
cssjs("remove",_44,"closed");
cssjs("add",_44,"active");
setStyle(_44,{height:content__height+"px"});
setStyle(_47,{height:head__height+"px"});
_45=_47.getElementsByTagName("div");
setStyle(_45[0],{display:"none"});
_45=_44.getElementsByTagName("div");
setStyle(_45[0],{display:"block"});
}else{
if(cssjs("check",_44,"closed")){
cssjs("remove",_44,"closed");
cssjs("add",_44,"active");
setStyle(_44,{height:content__height+"px"});
_45=_44.getElementsByTagName("div");
setStyle(_45[0],{display:"block"});
}
}
}
if(typeof Array.prototype.copy=="undefined"){
Array.prototype.copy=function(a){
var i=0,b=[];
for(i;i<this.length;i++){
b[i]=(typeof this[i].copy!="undefined")?this[i].copy():this[i];
}
return b;
};
}
if(typeof Array.prototype.concat=="undefined"){
Array.prototype.concat=function(a){
var i=0,b=this.copy();
for(i;i<a.length;i++){
b[b.length]=a[i];
}
return b;
};
}
if(typeof Array.prototype.pop=="undefined"){
Array.prototype.pop=function(){
var b=this[this.length-1];
this.length--;
return b;
};
}
if(typeof Array.prototype.push=="undefined"){
Array.prototype.push=function(){
var i=0,b=this.length,a=arguments;
for(i;i<a.length;i++){
this[b+i]=a[i];
}
return this.length;
};
}
if(typeof Array.prototype.shift=="undefined"){
Array.prototype.shift=function(){
var i=0,b=this[0];
for(i;i<this.length-1;i++){
this[i]=this[i+1];
}
this.length--;
return b;
};
}
if(typeof Array.prototype.slice=="undefined"){
Array.prototype.slice=function(a,c){
var i=0,b,d=[];
if(!c){
c=this.length;
}
if(c<0){
c=this.length+c;
}
if(a<0){
a=this.length-a;
}
if(c<a){
b=a;
a=c;
c=b;
}
for(i;i<c-a;i++){
d[i]=this[a+i];
}
return d;
};
}
if(typeof Array.prototype.splice=="undefined"){
Array.prototype.splice=function(a,c){
var i=0,e=arguments,d=this.copy(),f=a;
if(!c){
c=this.length-a;
}
for(i;i<e.length-2;i++){
this[a+i]=e[i+2];
}
for(a;a<this.length-c;a++){
this[a+e.length-2]=d[a-c];
}
this.length-=c-e.length+2;
return d.slice(f,f+c);
};
}
if(typeof Array.prototype.unshift=="undefined"){
Array.prototype.unshift=function(a){
var b;
this.reverse();
b=this.push(a);
this.reverse();
return b;
};
}

