//*******************************************************************
//methods below are Copyright(c)2007 ironbox.com
//do not used without permission
//*******************************************************************
var ironbox={makeTable:function(x,y,_3,_4,_5){
var _6="ABCDEFGHIJKLMNOPQRSTUVWXYZ";
y=y>_6.length?_6.length:y;
var _7=document.createElement("table");
_7.tcells=[];
var _8=0;
_7.className=_3;
for(var i=0;i<x;++i){
var tr=_7.insertRow(i);
tr.code=null;
tr.className=_3+"_tr";
if(_5){
if(i%2==1){
tr.className=_3+"_tr1";
tr.style.backgroundColor=_5[1];
}else{
tr.style.backgroundColor=_5[0];
}
}
tr.id=_3+i;
for(var j=0;j<y;++j){
var td=tr.insertCell(j);
td.code=null;
td.className=_3+"_td";
td.style.width=(100/y)+"%";
_7.tcells[_8++]=[_6.charAt(j)+(i+1),td];
td.id=_3+_6.charAt(j)+(i+1);
td.innerHTML=_4;
}
}
return _7;
},makeElement:function(_d,_e,_f,_10){
var el=document.createElement(_e);
if(_d&&_e!="table"){
el.innerHTML=_d;
}
_f.appendChild(el);
if(_10){
el.style.cssFloat=_10;
el.style.styleFloat=_10;
}
return el;
},makeOptions:function(_12,_13,_14,_15,_16,_17){
var _18;
if(typeof (_12)=="string"){
_18=document.getElementById(_12);
}else{
_18=_12;
}
for(var i=0;i<_13.length;i++){
var opt=document.createElement("option");
opt.value=(typeof (_16)=="number")?_16+i:(_16?_16[i]:_13[i]);
opt.id=_14?_14[i]:_18.id+"_"+i;
if(_15){
opt.className=_15;
}
opt.innerHTML=_13[i];
if(_17=="top"){
_18.insertBefore(opt,_18.firstChild);
}else{
_18.appendChild(opt);
}
}
},makeCSSRule:function(_1b,_1c,_1d){
var _1e=_1d?_1d:"ib_basess";
var ss;
ironbox.forEach(document.styleSheets,function(x){
if(x.title==_1e){
ss=x;
}
});
if(ss.insertRule){
ss.insertRule(_1b+" {"+_1c+"}",ss.cssRules.length);
return (ss.cssRules.length-1);
}else{
if(ss.addRule){
ss.addRule(_1b,_1c);
return (ss.rules.length-1);
}
}
},setOpacity:function(_21,val){
var _23=String(val/100);
_21.style.opacity=_23;
_21.style.filter="alpha(opacity="+val+")";
},setTransparency:function(_24,val){
val=100-val;
ironbox.setOpacity(_24,val);
},fadeOut:function(_26,_27,_28,_29,_2a){
if(_2a){
clearTimeout(_26.timeoutid);
}
_27=(_27>0)?_27:0;
ironbox.setOpacity(_26,_27);
if(!_27){
return;
}
var _2b=_27-_28;
_2a=_2a?_2a:_29;
_26.timeoutid=setTimeout(function(){
ironbox.fadeOut(_26,_2b,_28,_29);
},_2a);
},forEach:function(_2c,_2d){
var res=[];
for(var i=0;i<_2c.length;i++){
res.push(_2d(_2c[i]));
}
return res;
},readMousePos:function(e,_31){
var _32;
var _33;
if(e){
_32=e.clientX;
_33=e.clientY;
if(!_31){
e.stopPropagation();
}
}else{
_32=event.x;
_33=event.y;
event.cancelBubble=!_31;
}
return [_32,_33];
},stopPropag:function(e){
if(e){
e.stopPropagation();
}else{
event.cancelBubble=true;
}
return;
},packArray:function(arr){
var _36=[];
ironbox.forEach(arr,function(x){
if(x!=null&&x!=undefined){
_36.push(x);
}
});
return _36;
},keepTrying:function(_38,act,lat,_3b,_3c){
if(eval(_38)){
eval(act);
return;
}else{
if(_3b<=0){
eval(_3c);
}else{
setTimeout("ironbox.keepTrying(\""+_38+"\", \""+act+"\", "+lat+", "+--_3b+", \""+_3c+"\")",lat);
}
}
},fetchJS:function(uri){
var _3e=document.createElement("script");
_3e.type="text/javascript";
_3e.src=uri;
document.getElementsByTagName("head")[0].appendChild(_3e);
return _3e;
},fetchCSS:function(uri){
var _40=document.createElement("link");
_40.rel="stylesheet";
_40.type="text/css";
_40.href=uri;
document.getElementsByTagName("head")[0].appendChild(_40);
return _40;
},growImage:function(_41,_42,_43,to,_45){
var _46=document.getElementById(_41);
var _47=(to-_43)/10;
var wd=_46.width;
var ht=_46.height;
if(_46.endgrow){
_47=-_47;
if(wd<=_43){
_46.endgrow=false;
return;
}
}else{
if(wd>=to){
_47=0;
_46.endgrow=true;
}
}
_46.style.width=(wd+_47)+"px";
_46.style.height=(ht+_47)+"px";
setTimeout(ironbox.growImage,10,_41,_42,_43,to,_45);
}};
ironbox.fetchJS("/javascripts/choicea.js");

