
var text=" - ";
var delay=50;
var currentChar=1;
var destination="[none]";
function type() {
var dest=document.getElementById(destination);
if (dest) {
dest.innerHTML=text.substr(0, currentChar)+"";
currentChar++;
if (currentChar>text.length) {
currentChar=1;
} else {
setTimeout("type()", delay);
}
}

}

function startTyping(textParam, delayParam, destinationParam) {
text=textParam;
delay=delayParam;
currentChar=1;
destination=destinationParam;
type();
return false;
}

function changeopac(_3a,id){
var ids=document.getElementById(id).style;
ids.opacity=(_3a/100);
ids.MozOpacity=(_3a/100);
ids.KhtmlOpacity=(_3a/100);
ids.filter="alpha(opacity="+_3a+")";
}

function opacity(id,_35,_36,_37){
//if(document.getElementById(id).style.width==0){document.getElementById(id).style.width='100%';}
var _38=Math.round(_37/100);
var _39=0;
if(_35>_36){
for(i=_35;i>=_36;i--){
window.setTimeout("changeopac("+i+",'"+id+"')",(_39*_38));
_39++;
}
}else{
if(_35<_36){
for(i=_35;i<=_36;i++){
window.setTimeout("changeopac("+i+",'"+id+"')",(_39*_38));
_39++;
}
}
}
}

function pulsate(id,num,speed){
if (!speed) speed = 300;
for(i = 1; i <= num; i++) {
numx=i*((speed*2)+100)-(speed*2);
window.setTimeout("opacity('"+id+"', 100, 0, "+speed+")",numx);
window.setTimeout("opacity('"+id+"', 0, 100, "+speed+")",numx+speed+100);
}
}

function DecToHexa(_26){
var _27=parseInt(_26).toString(16);
if(_26<16){
_27="0"+_27;
}
return _27;
}

function colorize(_53,end,id,_56,_57){
dr=parseInt(_53.substring(1,3),16);
dg=parseInt(_53.substring(3,5),16);
db=parseInt(_53.substring(5,7),16);
fr=parseInt(end.substring(1,3),16);
fg=parseInt(end.substring(3,5),16);
fb=parseInt(end.substring(5,7),16);
steps=_56/10;
cr=dr;
cg=dg;
cb=db;
sr=(fr-dr)/steps;
sg=(fg-dg)/steps;
sb=(fb-db)/steps;
var zzi=25;
for(var x=0;x<steps;x++){
color="#"+DecToHexa(cr)+DecToHexa(cg)+DecToHexa(cb);

//if(x==(steps-1)){
//if(_57=="high"){
//color="";
//}else{
//color=end;
//}
//}

mytime=(x);
if(_57=="back"||_57=="high"){
newfonc="document.getElementById(\""+id+"\").style.backgroundColor=\""+color+"\";";
}else{
if(_57=="text"){
newfonc="document.getElementById(\""+id+"\").style.color=\""+color+"\";";
}else{
if(_57=="border"){
newfonc="document.getElementById(\""+id+"\").style.borderColor=\""+color+"\";";
}
}
}
window.setTimeout(newfonc,zzi);
cr+=sr;
cg+=sg;
cb+=sb;
zzi+=10;
}
}

function $morphColor(id,_4c,_4d,_4e,_4f,_50,_51,_52){
if(_52){
milli=_52;
}else{
milli=900;
}
colorize(_4c,_4d,id,milli,"text");
colorize(_4e,_4f,id,milli,"back");
if(_50!=false){
colorize(_50,_51,id,milli,"border");
}
}