var tempwidth=new Array();
var graphwidth=new Array();
var graphcount;


function isDefined(object) {
return (typeof object!='undefined');
}

function compatiblebrowser() {
return (isDefined(document.getElementById)||isDefined(document.all));
}

function dom(id) {
if(isDefined(document.getElementById)) {
return document.getElementById(id);
} else if(isDefined(document.all)) {
return document.all[id];
} else {
return false;
}}

function animategraph() {
var continueanimation=0;
for(var graphid=0;graphid<graphcount;graphid++) {
if(!tempwidth[graphid]) dom("graph"+graphid).style.display="";
if(tempwidth[graphid]<(graphwidth[graphid]-1)) {
continueanimation=1;
tempwidth[graphid]+=1.4;
dom("graph"+graphid).width=tempwidth[graphid];
} else {
dom("graph"+graphid).width=graphwidth[graphid];
}}
if(continueanimation) setTimeout("animategraph()",10);
}

function animatemeasure(graphid, width) {
if(compatiblebrowser()) dom('graph'+graphid).style.display='none';
graphwidth[graphid]=width-2;
}

function initialize() {
graphcount=graphwidth.length;
if(graphcount) {
for(var x=0;x<graphcount;x++) tempwidth[x]=0;
animategraph();
}}

if(compatiblebrowser()) window.onload=initialize;
