var main = function(mode){
	
	this._d = document;
	var browser = checkBrowser();
	this.setClass = setClassName(browser);
	this.set_event('a', 'rel');
	set_pagingWidth("top_menu");
}

main.prototype.set_event = function(ele, att, par){
	if(par == undefined){
		par = this._d;
	}
	var objs = par.getElementsByTagName(ele);
	for(var i=0;i<objs.length;i++){
		if(!objs[i].getAttribute(att)){
			continue;
		}
		var arr_attribute = objs[i].getAttribute(att).split("|");
		for(var j=0;j<arr_attribute.length;j++){
			switch(arr_attribute[j]){
				case "change_display" :
					objs[i].onclick = function(){
						change_display(this.getAttribute("name"), this.getAttribute("title"));
					}
				break;
				case "over_image" :
					objs[i].onmouseover = function(){
						overImage('_none', '_over', '', this.firstChild);
					}
					objs[i].onmouseout = function(){
						overImage('_over', '_none', '', this.firstChild);
					}
				break;
			}
		}
	}
}


