window.xpath=!!(document.evaluate);
if(window.ActiveXObject){
window.ie=window[window.XMLHttpRequest?"ie7":"ie6"]=true;
}else{
if(document.childNodes&&!document.all&&!navigator.taintEnabled){
window.khtml=window.webkit=window[window.xpath?"webkit420":"webkit419"]=true;
}else{
if(document.getBoxObjectFor!=null){
window.gecko=true;
}
}
}
function factorial(_1){
if(_1<=1){
return Math.max(_1,0);
}else{
return _1*factorial(_1-1);
}
};
function $Q(el){
if(typeof el=="string"){
return document.getElementById(el);
}else{
return el;
}
};
if(!Array.indexOf){
Array.prototype.indexOf=function(_3){
for(var i=0;i<this.length;i++){
if(this[i]==_3){
return i;
}
}
return -1;
};
}
Function.prototype.bind=function(_5){
var fn=this;
return function(){
return fn.apply(_5,arguments);
};
};
Function.prototype.pass=function(_7,_8){
var fn=this;
if(typeof _7!="array"){
_7=[_7];
}
return function(){
return fn.apply(_8||fn._proto_||fn,_7);
};
};
if(!Array.prototype.forEach){
Array.prototype.forEach=function(fn,_b){
for(var i=0;i<this.length;i++){
fn.call(_b,this[i],i);
}
};
}
Array.prototype.each=Array.prototype.forEach;
Array.prototype.includes=function(el){
for(var i=0;i<this.length;i++){
if(this[i]===el){
return true;
}
}
return false;
};
Array.prototype.test=function(_f){
for(var i=0;i<this.length;i++){
if(this[i]==_f){
return true;
}
}
return false;
};
Array.prototype.grep=function(_11){
var _12=[];
for(var i=0;i<this.length;i++){
if((typeof _11==="string"&&this[i]===_11)||this[i].match(_11)!=null){
_12.push(this[i]);
}
}
return _12;
};
var $=$Q;
var Ajax=function(url,_15){
this.options=_15||{};
this.options.method=this.options.method||"get";
this.url=url;
this.transport=this.getTransport();
};
Ajax.prototype={onStateChange:function(){
if(this.transport.readyState!=4){
return;
}else{
if(this.running&&this.transport&&this.transport.status==200){
if(this.options.onComplete){
this.options.onComplete(this.transport.responseText);
}
if(this.options.evalResponse){
eval(this.transport.responseText);
}
}
}
},request:function(){
this.running=true;
this.transport.open((this.options.method=="post")?"POST":"GET",this.url,true);
if(this.options.method=="post"&&this.options.postBody){
this.transport.setRequestHeader("Content-type","application/x-www-form-urlencoded");
this.transport.setRequestHeader("Content-length",(this.options.postBody||"").length);
this.transport.setRequestHeader("Connection","close");
}
var _16=this;
this.transport.onreadystatechange=function(){
_16.onStateChange();
};
if(this.options.method=="post"){
this.transport.send(this.options.postBody||"");
}else{
this.transport.send(null);
}
return false;
},getTransport:function(){
if(window.XMLHttpRequest){
return new XMLHttpRequest();
}else{
if(window.ActiveXObject){
return new ActiveXObject("Microsoft.XMLHTTP");
}
}
},cancel:function(){
this.running=false;
this.transport.abort();
this.transport.onreadystatechange=function(){
};
this.transport=this.getTransport();
}};
String.prototype.trim=function(){
return this.replace(/^\s+|\s+$/,"").replace(/^\s+|\s+$/,"");
};
var Lib={hasClass:function(el,_18){
return el&&el.className&&(el.className.split(" ").indexOf(_18)!=-1);
},getParams:function(){
var loc=document.location.href;
if(loc.indexOf("?")>=0){
var _1a=loc.split("?")[1];
var _1b=Lib._getParamsFrom(_1a);
}
return _1b||{};
},_getParamsFrom:function(str){
var _1d={};
var _1e=str.replace(/[#][^#]*$/,"").split("&");
for(var i=0;i<_1e.length;i++){
var _20=_1e[i].split("=");
if(typeof _20[1]!=="undefined"){
_1d[_20[0]]=unescape(_20[1]);
}
}
return _1d;
},getElementPosition:function(el,_22){
_22=_22||[];
var _23=0,top=0;
do{
_23+=el.offsetLeft||0;
top+=el.offsetTop||0;
el=el.offsetParent;
}while(el);
_22.each(function(_25){
_23-=_25.scrollLeft||0;
top-=_25.scrollTop||0;
});
return {"x":_23,"y":top};
},getMousePos:function(e,_27){
var _28=0;
var _29=0;
if(e.pageX||e.pageY){
_28=e.pageX;
_29=e.pageY;
}else{
if(e.clientX||e.clientY){
_28=e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft;
_29=e.clientY+document.body.scrollTop+document.documentElement.scrollTop;
}
}
_27=_27||[];
for(var i=0;i<_27.length;i++){
var _2b=_27[i];
_28+=_2b.scrollLeft||0;
_29+=_2b.scrollTop||0;
}
return {x:_28,y:_29};
},getComputedStyle:function(el,_2d){
var _2e="";
if(document.defaultView&&document.defaultView.getComputedStyle){
_2e=document.defaultView.getComputedStyle(el,"").getPropertyValue(_2d);
}else{
if(el.currentStyle){
_2d=_2d.replace(/-(w)/g,function(_2f,p1){
return p1.toUpperCase();
});
_2e=el.currentStyle[_2d];
}
}
if(_2e==="auto"||_2e=="0px"){
if(_2d==="height"){
_2e=el.offsetHeight;
}else{
if(_2d==="width"){
_2e=el.offsetWidth;
}
}
}
return _2e;
},swapNodes:function(e1,e2){
if(!e1.swapNode){
var _33=e1.cloneNode(1);
var _34=e1.parentNode;
e2=_34.replaceChild(_33,e2);
_34.replaceChild(e2,e1);
_34.replaceChild(e1,_33);
_33=null;
}else{
e1.swapNode(e2);
}
},swapArray:function(_35,_36,_37){
var tmp=_35[_36];
_35[_36]=_35[_37];
_35[_37]=tmp;
},stopPropagation:function(e){
e=e||window.event;
if(e.stopPropagation){
e.stopPropagation();
}else{
e.cancelBubble=true;
}
},purgeNodes:function(d){
this._purgeNodes(d);
if(typeof CollectGarbage!="undefined"){
CollectGarbage();
}
},purgeNode:function(d){
this._purgeNode(d);
if(typeof CollectGarbage!="undefined"){
CollectGarbage();
}
},_purgeNodes:function(d){
this._purgeNode(d);
var a=d.childNodes,i,l;
if(a){
l=a.length;
for(i=0;i<l;i+=1){
this._purgeNodes(d.childNodes[i]);
}
}
},_purgeNode:function(d){
var a=d.attributes,i,l,n;
if(a){
l=a.length;
for(i=0;i<l;i+=1){
if(typeof (a[i])!=="undefined"&&a[i]){
n=a[i].name;
if(n&&typeof d[n]==="function"){
d[n]=null;
}
}
}
}
},extend:function(_45,_46){
for(var _47 in _46){
_45[_47]=_46[_47];
}
return _45;
}};
var myGC=function(){
this.objs=[];
this.free=function(){
for(var i=0;i<this.objs.length;i++){
var obj=this.objs[i];
obj[0][obj[1]]=null;
}
this.objs=null;
gc=null;
};
this.add=function(){
for(var i=0;i<arguments.length;i++){
this.objs.push(arguments[i]);
}
};
};
var gc=new myGC();
var Menu=function(_4b,_4c,_4d){
this.clickEvent=_4d;
this.div=document.createElement("div");
this.shiv=document.createElement("iframe");
this.div.id="dropmenu";
this.div.className="dropmenu";
this.div.style.cssText="width: "+(_4c.width||150)+"px;top: "+_4c.top+"px;left: "+_4c.left+"px;";
this.shiv.style.cssText="position: absolute;opacity: 0;height: "+(_4b.length*18)+"px;width: "+(_4c.width||150)+"px;top: "+_4c.top+"px;left: "+_4c.left+"px;";
var _4e=[];
for(var i=0;i<_4b.length;i++){
_4e.push("<div class=\"menuline\">");
_4e.push(_4b[i].key);
_4e.push("</div>");
}
this.div.innerHTML=_4e.join("");
var _50=this.div.childNodes;
var _51=function(){
this.style.backgroundColor="#0000FF";
this.style.color="#FFF";
};
var _52=function(){
this.style.color="#000";
this.style.backgroundColor="#FFF";
};
for(var i=0;i<_50.length;i++){
_50[i].onclick=function(){
var _53=_4b[i].value;
return function(){
this.clickEvent(_53);
}.bind(this);
}.bind(this)();
_50[i].onmouseover=_51;
_50[i].onmouseout=_52;
}
setTimeout(function(){
document.body.onclick=function(){
document.body.removeChild(this.shiv);
document.body.removeChild(this.div);
document.body.onclick=null;
}.bind(this);
}.bind(this),0);
document.body.appendChild(this.shiv);
document.body.appendChild(this.div);
};
function init(){
if(arguments.callee.done){
return;
}
arguments.callee.done=true;
if(_timer){
clearInterval(_timer);
}
var _54=window.ondomready._events;
if(typeof _54!=="undefined"){
for(var i=0;i<_54.length;i++){
_54[i]();
}
}
window.ondomready._has_loaded=true;
};
if(document.addEventListener){
document.addEventListener("DOMContentLoaded",init,false);
}
if(document.attachEvent){
document.write("<scr"+"ipt id=__ie_onload defer src=javascript:void(0)></scr"+"ipt>");
var script=document.getElementById("__ie_onload");
script.onreadystatechange=function(){
if(this.readyState=="complete"){
init();
}
};
}
if(/WebKit/i.test(navigator.userAgent)){
var _timer=setInterval(function(){
if(/loaded|complete/.test(document.readyState)){
init();
}
},10);
}
window.onload=init;
window.ondomready={};
window.ondomready.addEvent=function(fun){
if(window.ondomready._has_loaded===true){
fun();
}else{
if(!window.ondomready._events){
window.ondomready._events=[];
}
window.ondomready._events.push(fun);
}
};
function toJson(obj){
switch(typeof obj){
case "object":
if(obj){
var _58=[];
if(obj instanceof Array){
for(var i=0;i<obj.length;i++){
_58.push(toJson(obj[i]));
}
return "["+_58.join(",")+"]";
}else{
for(var _5a in obj){
_58.push("\""+_5a+"\":"+toJson(obj[_5a]));
}
return "{"+_58.join(",")+"}";
}
}else{
return "null";
}
case "string":
return "\""+obj.replace(/(["'])/g,"\\$1")+"\"";
case "number":
case "boolean":
return new String(obj);
}
};
var Cookie={set:function(_5b,_5c,_5d){
var _5e=new Date();
var _5f=new Date();
if(_5d==null||_5d==0){
_5d=1;
}
_5f.setTime(_5e.getTime()+3600000*24*_5d);
document.cookie=_5b+"="+escape(_5c)+";expires="+_5f.toGMTString();
},get:function(_60){
var reg=new RegExp(_60+"=([^;]+)","i");
var _62=reg.exec(document.cookie);
if(_62&&_62[1]){
return unescape(_62[1]);
}else{
return null;
}
},destroy:function(_63){
document.cookie=_63+"=;expires=Thu, 01-Jan-1970 00:00:01 GMT";
}};
var Registrars=[{key:"<b>---- Purchase Domain ----</b>",value:"godaddy"},{key:"GoDaddy ($7.49 .com at checkout)",value:"godaddy"},{key:"1 & 1 ($8.99)",value:"1and1"},{key:"NameCheap ($9.98)",value:"namecheap"},{key:"Name.com ($9.98)",value:"name"},{key:"Register.com ($9.99)",value:"register"},{key:"Omnis ($7.95)",value:"omnis"},{key:"MyDomain ($8.27)",value:"mydomain"},{key:"Moniker ($10.65)",value:"moniker"},{key:"Dotster ($14.95)",value:"dotster"},{key:"<b>---- Domain &amp; Hosting ----</b>",value:"hosting"},{key:"Find with our Hosting Search <span style=\"font-size: 10px;color: #9C0000;\">new!</span>",value:"hosting"},{key:"GoDaddy ($3.99/mo)",value:"godaddy"},{key:"HostMonster ($8.95/mo)",value:"hostmonster"},{key:"Easy CGI ($7.96)",value:"easycgi"},{key:"Dreamhost ($9.95/mo)",value:"dreamhost"}];
if(typeof (WORD_MAKER)!=="undefined"){
Registrars.splice(0,0,{key:"<b>Save Domain</b>",value:"save"});
}
var Semaphore=function(_64,_65){
this.onComplete=_65;
this.onStart=_64;
this.count=0;
};
Semaphore.prototype={inc:function(){
this.count+=1;
this.onStart();
},dec:function(){
this.count=this.count-1;
if(this.count===0){
this.onComplete();
}
if(this.count<0){
this.count=0;
}
}};
var WordDiv=function(_66,_67,_68){
_68=_68||{};
this.domain=_66;
var _69="word_";
if(_68.iddomain){
_69=_68.iddomain;
}
var _6a=$Q(_69+_66);
if(_6a!=null){
this.div=null;
this.div=_6a;
return;
}
this.div=document.createElement("div");
var _6b=[];
if(_68.similarWordsArrow===true){
var _6c=true;
_6b.push("<img class=\"arrowRightImage\" src=\"/images/trans.gif\">");
}
if(_68.deleteFunc&&typeof _68.deleteFunc==="function"){
_6b.push("<img class=\"deleteImage\" src=\"/images/trans.gif\">");
}
if(_68&&_68.for_sale===1){
var _6d=_68.price[0];
if(_6d=="0"){
_6b.push("<button class=\"bidButton\">Bid</button>");
}else{
_6b.push("<button class=\"bidButton\">$"+_6d+"</button>");
}
}else{
if(_68&&_68.buy==="word_maker"){
_6b.push("<button class=\"buyButton2\">"+textStrings.buy+"</button>");
}else{
if(_68&&_68.buy===true){
_6b.push("<button class=\"saveButton\">&raquo;</button><button class=\"buyButton2\">"+textStrings.buy+"</button>");
}
}
}
if(_68.purchase&&_68.purchase===true){
_6b.push("<button class=\"buyButton\">"+textStrings.buy+"</button>");
}
_6b.push("<div title=\"");
_6b.push(_66);
_6b.push("\">");
_6b.push(_66);
_6b.push("</div>");
this.div.innerHTML=_6b.join("");
this.div.id=_69+_66;
this.div.className="wordDiv";
if(typeof _68.deleteFunc==="function"){
var _6e=(_6c)?1:0;
this.div.childNodes[_6e].onmousedown=_68.deleteFunc.pass([this.div.id],_68.bindObj);
}
if(_68.similarWordsArrow===true){
this.div.onclick=function(){
DomainNamer.suggestions.hide();
};
this.div.firstChild.onmouseover=this.showSyns.bind(this);
this.div.firstChild.onclick=function(e){
if(!e){
var e=window.event;
}
e.cancelBubble=true;
if(e.stopPropagation){
e.stopPropagation();
}
return false;
};
}
if(_68&&(_68.buy===true||_68.buy==="word_maker")){
if(window.webkit){
this.div.firstChild.style.height="19px";
if(this.div.childNodes[1]){
this.div.childNodes[1].style.height="19px";
}
}
}
_67.appendChild(this.div);
this.div.onmousemove=function(e){
if(typeof (DomainNamer)!=="undefined"&&DomainNamer.dragger&&DomainNamer.dragger.dragging!==true){
if(!e){
var e=window.event;
}
e.cancelBubble=true;
if(e.stopPropagation){
e.stopPropagation();
}
return false;
}
};
};
WordDiv.buyButtonClick=function(_71,_72,_73){
DomainPurchase.buyThrough(_72);
};
WordDiv.buyButtonMenu=function(_74,_75,_76){
var _77=$("availableResultList");
if(typeof (_77)==="undefined"||_77===null){
_77=$("cartList");
}
pos=Lib.getElementPosition(_76,[_77]);
var _78=(Lib.getComputedStyle(_76,"height")+"").replace(/px/,"")-0;
var _79=(Lib.getComputedStyle(_76,"width")+"").replace(/px/,"")-0;
var top=pos.y;
var _7b=pos.x;
var _7c=(18*Registrars.length);
var _7d=(window.webkit)?document.body.scrollTop:document.documentElement.scrollTop;
var _7e=document.documentElement.clientHeight;
if(_7e<(top+_78+_7c-_7d)&&(top-_7c)>_7d){
top-=_7c;
}else{
top+=_78;
if(!window.ie&&!window.webkit&&!window.opera){
top+=3;
}
if(window.ie){
top+=2;
}
}
if(window.ie||window.webkit||window.opera){
_7b-=14;
}
_7b+=_79;
_7b+=12;
new Menu(Registrars,{top:top,left:_7b-(220),width:220},function(val){
DomainPurchase.buyThrough(_75,val);
});
};
WordDiv.prototype={highlight:function(){
if(!((/msie 8./i).test(navigator.appVersion)&&window.ActiveXObject&&XDomainRequest)){
new Animator().addSubject(new ColorStyleSubject(this.div,"background-color","#CF3B19","#F6EFCC")).toggle();
}
},getDomain:function(){
return this.word;
},destroy:function(){
if(this.div&&this.div.parentNode){
this.div.parentNode.removeChild(this.div);
for(var i=0;i<this.div.childNodes.length;i++){
this.div.childNodes[i].onmousedown=null;
this.div.childNodes[i].onmouseover=null;
this.div.childNodes[i].onmouseout=null;
this.div.childNodes[i].onclick=null;
}
this.div.onmousedown=null;
this.div.onclick=null;
this.div=null;
}
},showSyns:function(){
DomainNamer.wordsList.resetBg();
this.div.style.backgroundColor="#B6381F";
this.div.childNodes[this.div.childNodes.length-1].style.color="#fff";
var _81=this.div.parentNode;
var _82=Lib.getElementPosition(this.div,[_81]);
var _83=Lib.getElementPosition(_81);
var _84=DomainNamer.suggestions.div;
if(document.all){
var _85=239;
}else{
var _85=237;
}
_84.style.left=(_82.x+_85)+"px";
var _86=_82.y-_83.y;
if(_86<(320/2)){
_84.aboveMid=true;
_84.style.top=(_82.y)+"px";
var _87=(320-(_82.y-_83.y));
_84.style.height=Math.min(250,_87)+"px";
}else{
_84.aboveMid=false;
var _87=(_86+20);
if(_87>250){
_84.style.top=(_82.y-250+22)+"px";
_84.style.height="250px";
}else{
_84.style.top=(_83.y)+"px";
_84.style.height=Math.min(_87,250)+"px";
}
_84.sugBottom=_82.y+22;
}
_84.innerHTML="";
DomainNamer.suggestions.show(this.domain);
},hideSyns:function(){
}};
var WordList=function(_88){
this.list=$Q(_88);
this.isempty=false;
this.words={};
if(_88==="wordsList"){
$Q("wordsListContainer").onmousemove=function(e){
if(typeof (DomainNamer)!=="undefined"&&DomainNamer.dragger&&DomainNamer.dragger.dragging!==true){
if(!e){
var e=window.event;
}
e.cancelBubble=true;
if(e.stopPropagation){
e.stopPropagation();
}
return false;
}
};
}
gc.add([this,"list"]);
if(this.list.addEventListener){
this.list.addEventListener("click",this.delegate,false);
}else{
this.list.onclick=this.delegate;
}
};
WordList.prototype={delegate:function(_8a){
_8a=_8a||window.event;
var _8b=_8a.target||_8a.srcElement;
var _8c=_8b;
while(!Lib.hasClass(_8c,"wordDiv")){
_8c=_8c.parentNode;
if(_8c==null){
return false;
}
}
var _8d=_8c.childNodes[_8c.childNodes.length-1].innerHTML.trim();
if(Lib.hasClass(_8b,"buyButton2")){
WordDiv.buyButtonMenu(_8a,_8d,_8b);
}else{
if(Lib.hasClass(_8b,"buyButton")){
WordDiv.buyButtonClick(_8a,_8d,_8b);
}else{
if(Lib.hasClass(_8b,"bidButton")){
var url="http://www.afternic.com/name.php?ref_id=134354&domain="+_8d;
window.open(url,"_blank");
}else{
if(Lib.hasClass(_8b,"saveButton")){
DomainNamer.toggleCart(_8d);
}
}
}
}
},addItem:function(_8f,_90){
this.empty();
_90=_90||{};
this.words[_8f]=new WordDiv(_8f,this.list,_90);
return this.words[_8f];
},empty:function(){
if(this.isempty===false){
this.isempty=true;
this.list.innerHTML="";
}
},getWord:function(_91){
return this.words[_91];
},resetBg:function(){
var els=document.getElementById("wordsList").getElementsByTagName("div");
if(els!=null){
for(var i=0;i<els.length;i++){
els[i].style.backgroundColor="";
els[i].style.color="#000";
}
}
}};
var HashCounter=function(){
this.selfsize=0;
this.hash={};
};
HashCounter.prototype={count:function(obj){
return this.hash[obj]||0;
},size:function(){
return this.selfsize;
},add:function(obj){
if(typeof this.hash[obj]==="undefined"){
this.hash[obj]=1;
this.selfsize+=1;
}else{
this.hash[obj]+=1;
}
},destroy:function(obj){
if(this.hash[obj]){
delete this.hash[obj];
this.selfsize-=1;
}
}};
var DomainPurchase={buyThrough:function(_97,_98){
if(typeof _98==="undefined"){
var _99=$Q("buyThrough").value;
}else{
var _99=_98;
}
try{
var img=document.createElement("img");
img.src="/search/save_data/"+_97+"?registrar="+_99+"&b=1&rnd="+Math.random();
document.getElementsByTagName("body")[0].appendChild(img);
if(typeof (_gaq)!=="undefined"){
_gaq.push(["_trackPageview","/off/dobuy"]);
_gaq.push(["_trackPageview","/off/buy/"+_99+"/"+_97]);
}
}
catch(e){
}
var url="";
var mid=Cookie.get("mid");
mid=mid||"";
var rid=Cookie.get("rid");
if(rid!==null){
mid+="x"+rid;
}
if(_99==="save"){
WordMaker.addToCart(_97,true);
return;
}else{
if(_99==="omnis"){
url="http://www.tkqlhce.com/click-2485956-10383577?sid="+mid;
}else{
if(_99==="godaddy"){
var tld=_97.match(/[.][^.]+$/)[0];
tld=tld.toUpperCase();
url="http://www.anrdoezrs.net/interactive?domainToCheck="+_97+"&tld="+tld+"&checkAvail=1&aid=10390987&pid=2485956&sid="+mid+"&url=http%3A%2F%2Fwww.godaddy.com%2Fgdshop%2Fregistrar%2Fsearch.asp%3Fisc%3D0000000000";
}else{
if(_99==="dotster"){
url="http://www.kqzyfj.com/interactive?DomainName="+_97+"&siteid=4798&aid=10275198&pid=2485956&sid="+mid+"&url=https%3A%2F%2Fsecure.registerapi.com%2Fdds2%2Findex.php&";
}else{
if(_99==="yahoo"){
url="http://www.anrdoezrs.net/click-2485956-10435426?sid="+mid;
}else{
if(_99==="networksolutions"){
url="http://www.commission-junction.com/interactive?domainNames="+_97+"&Hostname1=xxxxxx&Hostname2=xxxxxx&Tech=xxxxxx&regOption=%2Fen_US%2Fpurchase-it%2Fview-your-order.jhtml&aid=10444668&pid=2485956&sid="+mid+"&url=http%3A%2F%2Fwww.networksolutions.com%2Fcgi-bin%2Fpromo%2Fdomain-search";
}else{
if(_99==="1and1"){
var tld=_97.match(/[^.]+$/)[0];
var _9f=_97.replace(/[.][^.]+$/,"");
url="http://www.kqzyfj.com/interactive?domain="+_9f+"&tld="+tld+"&aid=10376103&pid=2665984&url="+encodeURIComponent("http://order.1and1.com/dcjump?ac=OM.US.US469K02463T2103a");
}else{
if(_99==="namecheap"){
var tld=_97.match(/[^.]+$/)[0];
var _9f=_97.replace(/[.][^.]+$/,"");
url="http://www.namecheap.com/domains/domain-name-search/bulk-domain-search/results.aspx?domain="+_97+"&searchall=&tlds=&type=bulk&aff=12880";
}else{
if(_99==="name"){
url="http://links.name.com/aff_c?offer_id=1&aff_id=57&url_id=3&file_id=30&aff_sub="+_97;
}else{
if(_99==="register"){
var tld=_97.match(/[.][^.]+$/)[0];
var _9f=_97.replace(/[.][^.]+$/,"");
url="http://click.linksynergy.com/fs-bin/click?id=x6ly/R*yXgA&offerid=138330.10000906&subid=0&type=4&searchString="+_9f+"&selectedTLDs="+tld+"";
}else{
if(_99==="123"){
url="http://www.dpbolvw.net/click-2485956-10465386?sid="+mid+"";
}else{
if(_99==="web"){
var tld=_97.match(/[^.]+$/)[0];
var _9f=_97.replace(/[.][^.]+$/,"").toLowerCase();
url="http://www.kqzyfj.com/click-2485956-10484263?sid="+mid+"&url=http%3A%2F%2Fwww.web.com%2Fcheckout%2Fdomain.aspx%3Fplan%3Ddnr%26domain%3D"+_9f+"%26tld%3D"+tld;
}else{
if(_99==="mydomain"){
url="https://secure.registerapi.com/dds2/index.php?AID=10275198&PID=2485956&SID="+mid+"&siteid=20788&DomainName="+_97.toLowerCase();
}else{
if(_99==="moniker"){
url="http://affiliates.moniker.com/pub/Affiliates?affiliate_id=1838&landingpage=register";
}else{
if(_99==="ipower"){
var tld=_97.match(/[^.]+$/)[0];
var _9f=_97.replace(/[.][^.]+$/,"").toLowerCase();
url="http://www.tkqlhce.com/click-2485956-10387219";
}else{
if(_99==="dreamhost"){
url="http://www.dreamhost.com/r.cgi?344400/signup%3Ffqdn="+_97;
}else{
if(_99==="hostmonster"){
url="http://www.anrdoezrs.net/click-2485956-10422106";
}else{
if(_99==="easycgi"){
url="http://www.kqzyfj.com/click-2485956-10392939";
}else{
if(_99==="sedosell"){
url="http://www.sedo.com/services/s_selldomain.php3?partnerid=31924";
}else{
if(_99==="sedopark"){
url="http://sedo.com/services/tour_parking.php?tracked=1&partnerid=31924&language=us";
}else{
if(_99==="hosting"){
url="http://www.hostsearchr.com/hosting?domain="+_97;
}else{
if(_99==="melbourne"){
var tld=_97.match(/[^.]+$/)[0];
tld=tld.toUpperCase();
var _9f=_97.replace(/[.][^.]+$/,"").toLowerCase();
url="http://www.melbourneit.com.au/affiliates/register/?affid=7051&domaintype="+tld+"&name="+_9f;
}else{
if(_99==="bust"){
var tld=_97.match(/[.][^.]+$/)[0];
tld=tld.toLowerCase();
url="https://www.securepaynet.net/gdshop/registrar/search.asp?prog_id=429540&Validate=0&currStep=0&searchSB=0&searchSBname=&tldReg=&searchSBselected=&queryOingo=&showAltTLDs=&fblur=0&checkAvail=1&domainToCheck="+_97+"&tld="+tld+"&image1.x=0&image1.y=0&oTab=0";
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
window.open(url,"_blank");
}};
var WordMaker={currentSearch:null,setup:function(){
this.cartList=new WordList("cartList");
this.cart_items=new HashCounter();
this.loading_sem=new Semaphore(function(){
$Q("loadingImage").style.display="inline";
},function(){
$Q("loadingImage").style.display="none";
});
$("wordsBox").onkeypress=this.formEnter;
this.trackResults();
},makeWords:function(_a0,_a1){
var _a2={};
if(typeof (_a1)!=="undefined"&&_a1===true){
_a2["word"]="";
_a2["rnd"]=Math.random();
}else{
_a2["word"]=_a0.elements.wordsBox.value;
}
var _a3=_a0.elements.show_taken.checked;
_a2["search_type"]=_a0.elements.search_type.value;
if(_a3==true){
_a2["taken"]="1";
}
var _a4=[];
var _a5=["com","net","org","info","biz"];
for(var i=0;i<_a5.length;i++){
var tld=_a5[i];
if(_a0.elements["tld_"+tld].checked==true){
_a4.push(tld);
}
}
_a2["tlds"]=_a4.join(",");
_a2["position"]=document.getElementById("position").value;
_a2["length"]=document.getElementById("word_length").value;
this.loadWords(_a2);
this.loadSynonyms(_a0.elements.wordsBox.value);
},loadWords:function(_a8){
this.currentSearch=_a8;
var url="http://"+REQUEST_HOST+":9091/?";
var _aa=[];
for(var _ab in _a8){
if(_a8.hasOwnProperty(_ab)){
_aa.push(encodeURIComponent(_ab)+"="+encodeURIComponent(_a8[_ab]));
}
}
url+=_aa.join("&");
var _ac=document.createElement("script");
_ac.src=url;
this.loading_sem.inc();
document.getElementsByTagName("head")[0].appendChild(_ac);
},loadSynonyms:function(wrd){
new Ajax("/suggest/word/"+wrd,{method:"get",onComplete:function(_ae){
if(_ae==""){
return;
}
var _af=eval(_ae);
var str=[];
for(var i=0;i<_af.length;i++){
if(!_af[i].match(/ /)){
str.push("<div onclick=\"WordMaker.simWord(this);\">"+_af[i]+"</div>");
}
}
$("otherWords").innerHTML=str.join("");
$("otherWordsContainer").style.display="block";
}}).request();
},simWord:function(div){
var _b3=$("wordsForm");
_b3.elements.wordsBox.value=div.innerHTML;
this.makeWords(_b3);
},results:function(res){
this.loading_sem.dec();
var _b5=3;
var _b6=document.getElementById("wmResults");
_b6.innerHTML="";
var _b7=res.data;
_b6.scrollTop=0;
if(_b7.length==0){
_b6.innerHTML="<p>No domains could be generated, consider expanding your options.</p>";
}else{
var _b8=res.tlds.split(/[,]/);
var _b9=document.createElement("table");
var _ba=document.createElement("tbody");
_b9.style.width="100%";
if(_b8.length==1){
var _bb=null;
for(var i=0;i<_b7.length;i++){
if(_bb===null){
_bb=document.createElement("tr");
}
var url=_b7[i];
var td=document.createElement("td");
td.innerHTML=url.url+"."+_b8[0];
if(url[_b8[0]]!=true){
td.className="wmResult";
}else{
td.className="wmResult wmAvailable";
}
_bb.appendChild(td);
if(i%_b5==(_b5-1)){
_ba.appendChild(_bb);
_bb=null;
}
}
if(_bb!==null){
var _bf=_bb.childNodes.length;
for(var k=0;k<_b5-_bf;k++){
_bb.appendChild(document.createElement("td"));
}
_ba.appendChild(_bb);
}
}else{
for(var i=0;i<_b7.length;i++){
var url=_b7[i];
var _bb=document.createElement("tr");
_bb.className="row";
var td=document.createElement("td");
td.innerHTML=url.url;
td.className="madeWord";
_bb.appendChild(td);
for(var k=0;k<_b8.length;k++){
var tld=_b8[k];
td=document.createElement("td");
if(url[tld]!=true){
td.className="wmResult wmResCol";
}else{
td.className="wmResult wmAvailable wmResColAvailable";
}
td.innerHTML=tld;
_bb.appendChild(td);
}
_ba.appendChild(_bb);
}
}
_b9.appendChild(_ba);
_b6.appendChild(_b9);
var _c2=$("resultsPaginator");
_c2.innerHTML="";
res["page"]=parseInt(res["page"]||0,10);
var _c3=document.createElement("button");
_c3.innerHTML="&laquo; Prev";
if(res["page"]>0&&res["word"]!=""){
var _c4=this;
_c3.onclick=function(){
delete res["data"];
res["page"]-=1;
_c4.loadWords(res);
};
}else{
_c3.disabled="true";
}
_c2.appendChild(_c3);
var _c5=document.createElement("button");
_c5.innerHTML="Next &raquo;";
if(res["page"]<6&&res["data"].length>49&&res["word"]!=""){
var _c4=this;
_c5.onclick=function(){
delete res["data"];
res["page"]+=1;
_c4.loadWords(res);
};
}else{
_c5.disabled="true";
}
_c2.appendChild(_c5);
}
},addToCart:function(_c6,_c7){
if(_c6==""){
return;
}
var _c8=$Q("word_"+_c6);
if(this.cart_items.count(_c6)===0){
this.cart_items.add(_c6);
this.cartList.addItem(_c6,{iddomain:"cartdomain_",deleteFunc:this.removeFromCart.pass([_c6],this),buy:"word_maker"});
if(_c7!==true){
var img=new Image();
img.src="/search/save_data/"+_c6;
}
if(_c8){
_c8.firstChild.innerHTML="x";
}
}
},removeFromCart:function(_ca){
var _cb=$Q("word_"+_ca);
if(this.cart_items.count(_ca)!==0){
this.cart_items.destroy(_ca);
this.cartList.getWord(_ca).destroy();
if(_cb){
_cb.firstChild.innerHTML="&raquo;";
}
}
},trackResults:function(){
$("wmResults").onclick=function(_cc){
_cc=_cc||window.event;
var _cd=(_cc.target||_cc.srcElement);
if(_cd.tagName=="U"){
_cd=_cd.parentNode;
}
if(!(_cd.className+"").match(/wmResult/)||!(_cd.className+"").match(/wmAvailable/)){
return;
}
pos=Lib.getElementPosition(_cd,[$("wmResults")]);
var _ce=(Lib.getComputedStyle(_cd,"height")+"").replace(/px/,"")-0;
var _cf=(Lib.getComputedStyle(_cd,"width")+"").replace(/px/,"")-0;
var top=pos.y;
var _d1=pos.x;
var _d2=(18*Registrars.length);
var _d3=document.documentElement.scrollTop;
var _d4=document.documentElement.clientHeight;
if(_d4<(top+_ce+_d2-_d3)&&(top-_d2)>_d3){
top-=_d2;
}else{
top+=_ce;
if(!window.ie){
top+=5;
}
}
if(window.ie){
_d1-=36;
}
if(_cd.parentNode.firstChild.className.match(/madeWord/)){
var _d5=_cd.parentNode.firstChild.innerHTML.replace(/[<][^>]*[>]/g,"")+"."+_cd.innerHTML;
}else{
var _d5=_cd.innerHTML.replace(/[<][^>]*[>]/g,"");
}
new Menu(Registrars,{top:top,left:_d1,width:220},function(val){
DomainPurchase.buyThrough(_d5,val);
});
};
},formEnter:function(_d7){
var _d8=window.event||_d7;
var _d9=_d8.keyCode||_d8.which;
if(_d9==13){
WordMaker.makeWords(this.form,false);
return false;
}
}};
var StateManager={checkOptionsArray:["tld_com","tld_net","tld_org","tld_info","tld_biz","show_taken"],fields:["wordsBox","position","search_type","word_length"],resumeLastSession:function(){
var _da=Cookie.get("lastsessionwm");
if(_da!=null&&_da!=""){
LightBox.show({div:$Q("resume_box"),height:150,width:400});
$("resumeButton").disabled=false;
$("newSession").disabled=false;
}else{
Cookie.destroy("lastsessionwm");
}
},loadLastSession:function(){
LightBox.close();
var _db=Cookie.get("lastsessionwm");
LightBox.showLoading();
this.loadState(_db);
Cookie.destroy("lastsessionwm");
},loadState:function(_dc){
resp_obj=eval("("+_dc+")");
if(resp_obj.settings){
for(var i=0;i<resp_obj.settings.length;i++){
var _de=resp_obj.settings[i];
$(_de).checked=true;
}
}
if(resp_obj.cart){
for(var i=0;i<resp_obj.cart.length;i++){
var _df=resp_obj.cart[i];
WordMaker.addToCart(_df,true);
}
}
if(resp_obj.fields){
for(var _e0 in resp_obj.fields){
if(resp_obj.fields.hasOwnProperty(_e0)){
var _e1=resp_obj.fields[_e0];
$(_e0).value=_e1;
}
}
}
if(resp_obj.currentSearch){
WordMaker.loadWords(resp_obj.currentSearch);
}
LightBox.hideLoading();
},dontResumeLastSession:function(){
LightBox.close();
Cookie.destroy("lastsessionwm");
},getState:function(){
var _e2=$("wordsForm");
var _e3=[];
for(var i=0;i<this.checkOptionsArray.length;i++){
var obj=$(this.checkOptionsArray[i]);
if(typeof obj!=="undefined"){
if(obj.checked==true){
_e3.push(this.checkOptionsArray[i]);
}
}
}
var _e6={};
for(var i=0;i<this.fields.length;i++){
var obj=$(this.fields[i]);
if(typeof obj!=="undefined"){
_e6[this.fields[i]]=obj.value;
}
}
var _e7=[];
var _e8=$("cartList").childNodes;
for(var i=0;i<_e8.length;i++){
var _e9=(_e8[i].id+"").match(/^cartdomain_(.*)/);
if(_e9!=null){
_e7.push(_e9[1]);
}
}
if($("wordsBox").value!=""){
return toJson({settings:_e3,cart:_e7,fields:_e6,currentSearch:WordMaker.currentSearch});
}else{
return null;
}
}};
window.ondomready.addEvent(function(){
WordMaker.setup();
setTimeout(function(){
StateManager.resumeLastSession();
},200);
});
window.onbeforeunload=function(){
var _ea=StateManager.getState();
if(_ea!=null){
Cookie.set("lastsessionwm",_ea,30);
}
};
var LightBox={show:function(_eb){
_eb=_eb||{};
_eb.height=_eb.height||300;
_eb.width=_eb.width||400;
if(!this.shutter){
this.shutter=document.createElement("div");
this.shutter.style.cssText="background-color: #ccc;position: absolute;top: 0px;left: 0px;width: 100%;opacity: 0.8;";
this.shutter.style.filter="alpha(opacity=80);";
this.shutter.style.height=(Math.max((window.innerHeight||0),document.body.clientHeight,document.documentElement.clientHeight,document.body.scrollHeight))+"px";
document.body.appendChild(this.shutter);
}
this.shutter.style.display="block";
if(_eb.url||_eb.div){
var _ec={};
_ec.marginLeft="-"+Math.round(_eb.width/2)+"px";
_ec.top=Math.max(((document.documentElement.scrollTop||document.body.scrollTop)+(Math.round((window.innerHeight||document.documentElement.clientHeight)/2))-Math.round(_eb.height/2)-0),10)+"px";
_ec.display="block";
_ec.zIndex=2000;
_ec.height=_eb.height+"px";
_ec.width=_eb.width+"px";
_ec.position="absolute";
}
if(_eb.url){
_ec.left="50%";
_ec.backgroundColor="#fff";
_ec.textAlign="right";
_ec.border="2px solid black";
delete _ec.height;
this.box=document.createElement("div");
for(var _ed in _ec){
this.box.style[_ed]=_ec[_ed];
}
var _ee="<a href=\"\" onclick=\"LightBox.close();return false;\">[X] Close</a>&nbsp;<br />";
if(_eb.hideClose&&_eb.hideClose===true){
_ee="";
}
if(_eb.popoverColor&&_eb.popoverColor===true){
this.box.style.backgroundColor="#F6EFCC";
}
this.box.innerHTML=_ee+"<iframe style=\"margin-top: 2px;border: 0px;height: "+_eb.height+"px;width: "+_eb.width+"px;\" frameborder=\"0\" src=\""+_eb.url+"\"></iframe>";
document.body.appendChild(this.box);
}
if(_eb.div){
var ie6=!!(document.all&&!window.XMLHttpRequest);
if(ie6){
this.iframe=document.createElement("iframe");
this.iframe.style.cssText="position: absolute;left: 50%;";
if(_eb.overflowHidden&&_eb.overflowHidden===true){
this.iframe.style.overflow="hidden";
}
this.iframe.frameborder="0";
}
this.div=_eb.div;
for(var _ed in _ec){
this.div.style[_ed]=_ec[_ed];
if(ie6){
this.iframe.style[_ed]=_ec[_ed];
}
}
if(ie6){
this.iframe.style.zIndex=1988;
document.body.appendChild(this.iframe);
}
}
},close:function(){
if(this.shutter){
this.shutter.style.display="none";
if(this.box){
document.body.removeChild(this.box);
delete this.box;
}
if(this.iframe){
document.body.removeChild(this.iframe);
delete this.iframe;
}
if(this.div){
this.div.style.display="none";
delete this.div;
}
}
},showLoading:function(){
this.showingLoading=true;
this.show({url:"/search/loading/",height:100,width:300,hideClose:true,overflowHidden:true});
},hideLoading:function(){
if(this.showingLoading===true){
this.showingLoading=false;
this.close();
}
}};
﻿;
function Animator(_f0){
this.setOptions(_f0);
var _f1=this;
this.timerDelegate=function(){
_f1.onTimerEvent();
};
this.subjects=[];
this.target=0;
this.state=0;
};
Animator.prototype={setOptions:function(_f2){
this.options=Animator.applyDefaults({interval:40,duration:400,onComplete:function(){
},onStep:function(){
},transition:Animator.tx.easeInOut},_f2);
},seekTo:function(to){
this.seekFromTo(this.state,to);
},seekFromTo:function(_f4,to){
this.target=Math.max(0,Math.min(1,to));
this.state=Math.max(0,Math.min(1,_f4));
if(!this.intervalId){
this.intervalId=window.setInterval(this.timerDelegate,this.options.interval);
}
},jumpTo:function(to){
this.target=this.state=Math.max(0,Math.min(1,to));
this.propagate();
},toggle:function(){
this.seekTo(1-this.target);
},addSubject:function(_f7){
this.subjects[this.subjects.length]=_f7;
return this;
},removeSubject:function(_f8){
this.subjects=this.subjects.reject(function(_f9){
return _f9==_f8;
});
},clearSubjects:function(){
this.subjects=[];
},propagate:function(){
var _fa=this.options.transition(this.state);
for(var i=0;i<this.subjects.length;i++){
if(this.subjects[i].setState){
this.subjects[i].setState(_fa);
}else{
this.subjects[i](_fa);
}
}
},onTimerEvent:function(){
var _fc=(this.options.interval/this.options.duration)*(this.state<this.target?1:-1);
if(Math.abs(_fc)>=Math.abs(this.state-this.target)){
this.state=this.target;
}else{
this.state+=_fc;
}
try{
this.propagate();
}
finally{
this.options.onStep.call(this);
if(this.target==this.state){
window.clearInterval(this.intervalId);
this.intervalId=null;
this.options.onComplete.call(this);
}
}
},play:function(){
this.seekFromTo(0,1);
},reverse:function(){
this.seekFromTo(1,0);
},inspect:function(){
var str="#<Animator:";
str+=">";
return str;
}};
Animator.applyDefaults=function(_fe,_ff){
_ff=_ff||{};
var prop,_101={};
for(prop in _fe){
_101[prop]=_ff[prop]!==undefined?_ff[prop]:_fe[prop];
}
return _101;
};
Animator.makeArray=function(o){
if(o==null){
return [];
}
if(!o.length){
return [o];
}
var _103=[];
for(var i=0;i<o.length;i++){
_103[i]=o[i];
}
return _103;
};
Animator.camelize=function(_105){
var _106=_105.split("-");
if(_106.length==1){
return _106[0];
}
var _107=_105.indexOf("-")==0?_106[0].charAt(0).toUpperCase()+_106[0].substring(1):_106[0];
for(var i=1,len=_106.length;i<len;i++){
var s=_106[i];
_107+=s.charAt(0).toUpperCase()+s.substring(1);
}
return _107;
};
Animator.apply=function(el,_10c,_10d){
if(_10c instanceof Array){
return new Animator(_10d).addSubject(new CSSStyleSubject(el,_10c[0],_10c[1]));
}
return new Animator(_10d).addSubject(new CSSStyleSubject(el,_10c));
};
Animator.makeEaseIn=function(a){
return function(_10f){
return Math.pow(_10f,a*2);
};
};
Animator.makeEaseOut=function(a){
return function(_111){
return 1-Math.pow(1-_111,a*2);
};
};
Animator.makeElastic=function(_112){
return function(_113){
_113=Animator.tx.easeInOut(_113);
return ((1-Math.cos(_113*Math.PI*_112))*(1-_113))+_113;
};
};
Animator.makeADSR=function(_114,_115,_116,_117){
if(_117==null){
_117=0.5;
}
return function(_118){
if(_118<_114){
return _118/_114;
}
if(_118<_115){
return 1-((_118-_114)/(_115-_114)*(1-_117));
}
if(_118<_116){
return _117;
}
return _117*(1-((_118-_116)/(1-_116)));
};
};
Animator.makeBounce=function(_119){
var fn=Animator.makeElastic(_119);
return function(_11b){
_11b=fn(_11b);
return _11b<=1?_11b:2-_11b;
};
};
Animator.tx={easeInOut:function(pos){
return ((-Math.cos(pos*Math.PI)/2)+0.5);
},linear:function(x){
return x;
},easeIn:Animator.makeEaseIn(1.5),easeOut:Animator.makeEaseOut(1.5),strongEaseIn:Animator.makeEaseIn(2.5),strongEaseOut:Animator.makeEaseOut(2.5),elastic:Animator.makeElastic(1),veryElastic:Animator.makeElastic(3),bouncy:Animator.makeBounce(1),veryBouncy:Animator.makeBounce(3)};
function NumericalStyleSubject(els,_11f,from,to,_122){
this.els=Animator.makeArray(els);
if(_11f=="opacity"&&window.ActiveXObject){
this.property="filter";
}else{
this.property=Animator.camelize(_11f);
}
this.from=parseFloat(from);
this.to=parseFloat(to);
this.units=_122!=null?_122:"px";
};
NumericalStyleSubject.prototype={setState:function(_123){
var _124=this.getStyle(_123);
var _125=(this.property=="opacity"&&_123==0)?"hidden":"";
var j=0;
for(var i=0;i<this.els.length;i++){
try{
this.els[i].style[this.property]=_124;
}
catch(e){
if(this.property!="fontWeight"){
throw e;
}
}
if(j++>20){
return;
}
}
},getStyle:function(_128){
_128=this.from+((this.to-this.from)*_128);
if(this.property=="filter"){
return "alpha(opacity="+Math.round(_128*100)+")";
}
if(this.property=="opacity"){
return _128;
}
return Math.round(_128)+this.units;
}};
function ColorStyleSubject(els,_12a,from,to){
this.els=Animator.makeArray(els);
this.property=Animator.camelize(_12a);
this.to=this.expandColor(to);
this.from=this.expandColor(from);
};
ColorStyleSubject.prototype={expandColor:function(_12d){
var _12e,red,_130,blue;
_12e=ColorStyleSubject.parseColor(_12d);
if(_12e){
red=parseInt(_12e.slice(1,3),16);
_130=parseInt(_12e.slice(3,5),16);
blue=parseInt(_12e.slice(5,7),16);
return [red,_130,blue];
}
if(window.DEBUG){
alert("Invalid colour: '"+_12d+"'");
}
},getValueForState:function(_132,_133){
return Math.round(this.from[_132]+((this.to[_132]-this.from[_132])*_133));
},setState:function(_134){
var _135="#"+ColorStyleSubject.toColorPart(this.getValueForState(0,_134))+ColorStyleSubject.toColorPart(this.getValueForState(1,_134))+ColorStyleSubject.toColorPart(this.getValueForState(2,_134));
for(var i=0;i<this.els.length;i++){
this.els[i].style[this.property]=_135;
}
}};
ColorStyleSubject.parseColor=function(_137){
var _138="#",_139;
if(_139=ColorStyleSubject.parseColor.rgbRe.exec(_137)){
var part;
for(var i=1;i<=3;i++){
part=Math.max(0,Math.min(255,parseInt(_139[i])));
_138+=ColorStyleSubject.toColorPart(part);
}
return _138;
}
if(_139=ColorStyleSubject.parseColor.hexRe.exec(_137)){
if(_139[1].length==3){
for(var i=0;i<3;i++){
_138+=_139[1].charAt(i)+_139[1].charAt(i);
}
return _138;
}
return "#"+_139[1];
}
return false;
};
ColorStyleSubject.toColorPart=function(_13c){
if(_13c>255){
_13c=255;
}
var _13d=_13c.toString(16);
if(_13c<16){
return "0"+_13d;
}
return _13d;
};
ColorStyleSubject.parseColor.rgbRe=/^rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/i;
ColorStyleSubject.parseColor.hexRe=/^\#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/;
function DiscreteStyleSubject(els,_13f,from,to,_142){
this.els=Animator.makeArray(els);
this.property=Animator.camelize(_13f);
this.from=from;
this.to=to;
this.threshold=_142||0.5;
};
DiscreteStyleSubject.prototype={setState:function(_143){
var j=0;
for(var i=0;i<this.els.length;i++){
this.els[i].style[this.property]=_143<=this.threshold?this.from:this.to;
}
}};
function CSSStyleSubject(els,_147,_148){
els=Animator.makeArray(els);
this.subjects=[];
if(els.length==0){
return;
}
var prop,_14a,_14b;
if(_148){
_14b=this.parseStyle(_147,els[0]);
_14a=this.parseStyle(_148,els[0]);
}else{
_14a=this.parseStyle(_147,els[0]);
_14b={};
for(prop in _14a){
_14b[prop]=CSSStyleSubject.getStyle(els[0],prop);
}
}
var prop;
for(prop in _14b){
if(_14b[prop]==_14a[prop]){
delete _14b[prop];
delete _14a[prop];
}
}
var prop,_14c,_14d,type,from,to;
for(prop in _14b){
var _151=String(_14b[prop]);
var _152=String(_14a[prop]);
if(_14a[prop]==null){
if(window.DEBUG){
alert("No to style provided for '"+prop+"\"");
}
continue;
}
if(from=ColorStyleSubject.parseColor(_151)){
to=ColorStyleSubject.parseColor(_152);
type=ColorStyleSubject;
}else{
if(_151.match(CSSStyleSubject.numericalRe)&&_152.match(CSSStyleSubject.numericalRe)){
from=parseFloat(_151);
to=parseFloat(_152);
type=NumericalStyleSubject;
_14d=CSSStyleSubject.numericalRe.exec(_151);
var _153=CSSStyleSubject.numericalRe.exec(_152);
if(_14d[1]!=null){
_14c=_14d[1];
}else{
if(_153[1]!=null){
_14c=_153[1];
}else{
_14c=_153;
}
}
}else{
if(_151.match(CSSStyleSubject.discreteRe)&&_152.match(CSSStyleSubject.discreteRe)){
from=_151;
to=_152;
type=DiscreteStyleSubject;
_14c=0;
}else{
if(window.DEBUG){
alert("Unrecognised format for value of "+prop+": '"+_14b[prop]+"'");
}
continue;
}
}
}
this.subjects[this.subjects.length]=new type(els,prop,from,to,_14c);
}
};
CSSStyleSubject.prototype={parseStyle:function(_154,el){
var rtn={};
if(_154.indexOf(":")!=-1){
var _157=_154.split(";");
for(var i=0;i<_157.length;i++){
var _159=CSSStyleSubject.ruleRe.exec(_157[i]);
if(_159){
rtn[_159[1]]=_159[2];
}
}
}else{
var prop,_15b,_15c;
_15c=el.className;
el.className=_154;
for(var i=0;i<CSSStyleSubject.cssProperties.length;i++){
prop=CSSStyleSubject.cssProperties[i];
_15b=CSSStyleSubject.getStyle(el,prop);
if(_15b!=null){
rtn[prop]=_15b;
}
}
el.className=_15c;
}
return rtn;
},setState:function(_15d){
for(var i=0;i<this.subjects.length;i++){
this.subjects[i].setState(_15d);
}
}};
CSSStyleSubject.getStyle=function(el,_160){
var _161;
if(document.defaultView&&document.defaultView.getComputedStyle){
_161=document.defaultView.getComputedStyle(el,"").getPropertyValue(_160);
if(_161){
return _161;
}
}
_160=Animator.camelize(_160);
if(el.currentStyle){
_161=el.currentStyle[_160];
}
return _161||el.style[_160];
};
CSSStyleSubject.ruleRe=/^\s*([a-zA-Z\-]+)\s*:\s*(\S(.+\S)?)\s*$/;
CSSStyleSubject.numericalRe=/^-?\d+(?:\.\d+)?(%|[a-zA-Z]{2})?$/;
CSSStyleSubject.discreteRe=/^\w+$/;
CSSStyleSubject.cssProperties=["azimuth","background","background-attachment","background-color","background-image","background-position","background-repeat","border-collapse","border-color","border-spacing","border-style","border-top","border-top-color","border-right-color","border-bottom-color","border-left-color","border-top-style","border-right-style","border-bottom-style","border-left-style","border-top-width","border-right-width","border-bottom-width","border-left-width","border-width","bottom","clear","clip","color","content","cursor","direction","display","elevation","empty-cells","css-float","font","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","height","left","letter-spacing","line-height","list-style","list-style-image","list-style-position","list-style-type","margin","margin-top","margin-right","margin-bottom","margin-left","max-height","max-width","min-height","min-width","orphans","outline","outline-color","outline-style","outline-width","overflow","padding","padding-top","padding-right","padding-bottom","padding-left","pause","position","right","size","table-layout","text-align","text-decoration","text-indent","text-shadow","text-transform","top","vertical-align","visibility","white-space","width","word-spacing","z-index","opacity","outline-offset","overflow-x","overflow-y"];
function AnimatorChain(_162,_163){
this.animators=_162;
this.setOptions(_163);
for(var i=0;i<this.animators.length;i++){
this.listenTo(this.animators[i]);
}
this.forwards=false;
this.current=0;
};
AnimatorChain.prototype={setOptions:function(_165){
this.options=Animator.applyDefaults({resetOnPlay:true},_165);
},play:function(){
this.forwards=true;
this.current=-1;
if(this.options.resetOnPlay){
for(var i=0;i<this.animators.length;i++){
this.animators[i].jumpTo(0);
}
}
this.advance();
},reverse:function(){
this.forwards=false;
this.current=this.animators.length;
if(this.options.resetOnPlay){
for(var i=0;i<this.animators.length;i++){
this.animators[i].jumpTo(1);
}
}
this.advance();
},toggle:function(){
if(this.forwards){
this.seekTo(0);
}else{
this.seekTo(1);
}
},listenTo:function(_168){
var _169=_168.options.onComplete;
var _16a=this;
_168.options.onComplete=function(){
if(_169){
_169.call(_168);
}
_16a.advance();
};
},advance:function(){
if(this.forwards){
if(this.animators[this.current+1]==null){
return;
}
this.current++;
this.animators[this.current].play();
}else{
if(this.animators[this.current-1]==null){
return;
}
this.current--;
this.animators[this.current].reverse();
}
},seekTo:function(_16b){
if(_16b<=0){
this.forwards=false;
this.animators[this.current].seekTo(0);
}else{
this.forwards=true;
this.animators[this.current].seekTo(1);
}
}};
function Accordion(_16c){
this.setOptions(_16c);
var _16d=this.options.initialSection,_16e;
if(this.options.rememberance){
_16e=document.location.hash.substring(1);
}
this.rememberanceTexts=[];
this.ans=[];
var _16f=this;
for(var i=0;i<this.options.sections.length;i++){
var el=this.options.sections[i];
var an=new Animator(this.options.animatorOptions);
var from=this.options.from+(this.options.shift*i);
var to=this.options.to+(this.options.shift*i);
an.addSubject(new NumericalStyleSubject(el,this.options.property,from,to,this.options.units));
an.jumpTo(0);
var _175=this.options.getActivator(el);
_175.index=i;
_175.onclick=function(){
_16f.show(this.index);
};
this.ans[this.ans.length]=an;
this.rememberanceTexts[i]=_175.innerHTML.replace(/\s/g,"");
if(this.rememberanceTexts[i]===_16e){
_16d=i;
}
}
this.show(_16d);
};
Accordion.prototype={setOptions:function(_176){
this.options=Object.extend({sections:null,getActivator:function(el){
return document.getElementById(el.getAttribute("activator"));
},shift:0,initialSection:0,rememberance:true,animatorOptions:{}},_176||{});
},show:function(_178){
for(var i=0;i<this.ans.length;i++){
this.ans[i].seekTo(i>_178?1:0);
}
if(this.options.rememberance){
document.location.hash=this.rememberanceTexts[_178];
}
}};


