var base="http://scribbl.net/";
String.prototype.entityify=function(){
return this.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;");
};
function addEvent(_1,_2,fn){
if(_1.addEventListener){
_1.addEventListener(_2,fn,false);
return true;
}else{
if(_1.attachEvent){
var r=_1.attachEvent("on"+_2,fn);
return r;
}else{
alert("Handler could not be added");
}
}
}
function getEventTarget(e){
e=window.event?window.event:e;
var _6=e.target||e.srcElement;
if(_6.nodeType==3){
_6=_6.parentNode;
}
return _6;
}
function getElementsByClass(_7,_8,_9){
var _a=[];
if(_9==null){
_9=document;
}
if(_8==null){
_8="*";
}
var _b=_9.getElementsByTagName(_8);
var _c=_b.length;
var _d=new RegExp("\\b"+_7+"\\b");
var i;
var j;
for(i=0,j=0;i<_c;i++){
if(_d.test(_b[i].className)){
_a[j]=_b[i];
j++;
}
}
return _a;
}
var cookie={get:function(_10){
var _11="",c=" "+document.cookie+";",s=c.indexOf((" "+_10+"="));
if(s>=0){
s+=_10.length+2;
_11=unescape(c.substring(s,c.indexOf(";",s)));
}
return _11;
},set:function(_14,_15,_16){
document.cookie=_14+"="+escape(_15)+";expires="+(new Date(_16*1000)).toGMTString()+";path=/"+";domain=scribbl.net";
},erase:function(_17){
this.get(_17,"",-1);
}};
function getElmById(id){
return document.getElementById(id);
}
function DOMExtend(){
try{
HTMLElement.prototype.click=function(){
if(typeof this.onclick=="function"){
this.onclick({type:"click"});
}
};
}
catch(ex){
}
}
function OpacitySet(_19,_1a){
_19.style.opacity=(_1a/100);
_19.style.filter="alpha(opacity="+_1a+")";
}
function getStyle(el,_1c){
var y;
if(el.currentStyle){
y=el.currentStyle[_1c];
}else{
if(window.getComputedStyle){
y=document.defaultView.getComputedStyle(el,null).getPropertyValue(_1c);
}
}
if(undefined===y&&0<_1c.indexOf("-")){
y=getStyle(el,_1c.replace("-s","S").replace("-i","I"));
}
return y;
}
function resizeTextArea(t,_1f,_20){
t.rows=_1f;
t.style.overflow="auto";
var _21=t.value.split("\n");
if(t.clientHeight<t.scrollHeight){
while(t.clientHeight<t.scrollHeight){
t.rows=t.rows+1;
}
t.rows=t.rows+2;
}
}

