window.addEvent('domready', function(){
	// External anchors
	if (!document.getElementsByTagName) return;
	$$('a[rel=external]', 'a.external').each(function(el){
		if (el.href)
		{
			el.target = "_blank";
		}
	});
	
	$$('#vmw h2.accord a').each(function(el){
		el.addEvents({
			'click' : function(e){
				e.stop();
			}
		});	
	});
});


function ShowCharMen() {
	if(this.SCOUNT<=this.CHARNAMES[this.MCOUNT].length)
    {
    	if (this.MCOUNT != 0) {document.getElementById(this.NAMES+(this.MCOUNT-1)).style.display = 'none';}
    	if (this.MCOUNT == 0) {document.getElementById(this.NAMES+(this.ITEMS-1)).style.display = 'none';}
		document.getElementById(this.NAMES+this.MCOUNT).style.display = 'inline';        
		document.getElementById(this.NAMES+this.MCOUNT).innerHTML = this.CHARURLS[this.MCOUNT]+this.CHARNAMES[this.MCOUNT].substr(0,this.SCOUNT++)+'</a>';
		this.STIMER=setTimeout(this.OBJ + ".RUN()",this.CHARSPEED);
	} 
    else
    {    	
    	this.SCOUNT = 0; 
        this.MCOUNT++; 
        if(this.MCOUNT==this.ITEMS) {this.MCOUNT=0}; 
        if (this.MARKED==0) {
        	this.STIMER=setTimeout(this.OBJ + ".RUN()",this.TITLESPEED);
        }
    }
}

function CharMen_on() {
    this.MARKED = 0;
	clearTimeout(this.STIMER);
	this.STIMER = setTimeout(this.OBJ + ".RUN()",this.CHARSPEED);
}

function CharMen_off() {
	this.MARKED = 1;
	clearTimeout(this.STIMER);
}

function CharMen(obj,count_items,name_item,CharSpeed,TitleSpeed) {
this.OBJ = obj;
this.ITEMS = count_items;
this.NAMES = name_item;
this.CHARSPEED = CharSpeed;
this.TITLESPEED = TitleSpeed;
this.CHARNAMES = new Array(this.ITEMS);
this.CHARURLS = new Array(this.ITEMS);
this.MCOUNT = 0;
this.STIMER = 0;
this.SCOUNT = 0;
this.MARKED = 0;
this.RUN = ShowCharMen;
this.STOP = CharMen_off;
this.CONTINUE = CharMen_on;

for ( ch=0; ch<this.ITEMS; ch++ ) {

this.CHARNAMES[ch] = document.getElementById(this.NAMES + ch).innerHTML;
this.CHARURLS[ch] = this.CHARNAMES[ch].substring(this.CHARNAMES[ch].indexOf('<'), this.CHARNAMES[ch].indexOf('>',this.CHARNAMES[ch].indexOf('<') + 1) + 1);
this.CHARNAMES[ch] = this.CHARNAMES[ch].substring(this.CHARNAMES[ch].indexOf('>') + 1, this.CHARNAMES[ch].lastIndexOf('<'));

document.getElementById(this.NAMES + ch).innerHTML = '';
document.getElementById(this.NAMES + ch).style.display = 'none';

  };
if(this.MCOUNT<=this.ITEMS) {
this.STIMER=setTimeout(this.OBJ+".RUN()",this.CHARSPEED);
}

}