function NvChange() {

	this.version = "0.1";
	this.name = "NvChange";
	this.item = new Array();
	this.itemcount = 0;
	this.itemoffset = 0;
	this.item_i = new Array();
	this.item_icount = 0;
	this.item_ioffset = 0;
	this.currentspeed = 0;
	this.scrollspeed = 50;
	this.pausedelay = 1000;
	this.pausemouseover = false;
	this.stop = 0;
	this.height = 100;
	this.heightGap = 0;
	this.width = 100;
	this.height_i = 100;
	this.width_i = 100;
	this.stopHeight=0;
	this.count=0;
	this.flag=true;
	this.position="absolute";
	this.item_position="absolute";

	this.addImage = function () {
		var text = arguments[0];
		this.item_i[this.item_icount] = text;
		this.item_icount = this.item_icount + 1;
	};

	this.ready = function () {
		now = new Date(); ran = now % this.item_icount;
		temp = this.item_i[ran]; this.item_i[ran] = this.item_i[0]; this.item_i[0] = temp;
		this.displayImage();
		obj_i = document.getElementById(this.name+'item_i0').style;
		obj_i.display='block';
		this.count++;
		setTimeout(this.name+'.scroll()',this.currentspeed);
	};

	this.displayImage = function () {
		document.write('<div id="'+this.name+'_i" style="left:0; height:'+this.height_i+';width:'+this.width_i+';position:relative;overflow:hidden;" OnMouseOver="'+this.name+'.onmouseover();" OnMouseOut="'+this.name+'.onmouseout();">');
		for(var i = 0; i < this.item_icount; i++) {
			document.write('<div id="'+this.name+'item_i'+i+'"style="left:0px; width:'+this.width_i+'; display:none; ">');
			document.write(this.item_i[i]);
			document.write('</div>');
		}
		document.write('</div>');
	};

	this.scroll = function () {
		this.currentspeed = this.scrollspeed;
		if ( !this.stop ) {
			this.imageChange();
		}
		window.setTimeout(this.name+".scroll()",this.currentspeed);
	};


	this.imageChange = function ()
	{
		for (k = 0; k < this.item_icount; k++) {
			obj_i = document.getElementById(this.name+'item_i'+k).style;
			if (this.count % this.item_icount == k) {
				obj_i.display = 'block';
			} else {
				obj_i.display = 'none';
			}
		}
		for (k = 0; k < this.itemcount; k++) {
			obj = document.getElementById(this.name+'item'+k).style;
			if (this.count % this.itemcount == k) {
				obj.display = 'block';
			} else {
				obj.display = 'none';
			}
		}
		this.count++;
	}

	this.onmouseover = function ()
	{
		if ( this.pausemouseover ) {
			this.stop = 1;
		}
	};
		for (k = 0; k < this.item_icount; k++) {
			obj_i = document.getElementById(this.name+'item_i'+k).style;
			if (this.count % this.item_icount == k) {
				obj_i.display = 'block';
			} else {
				obj_i.display = 'none';
			}
		}

	this.onmouseout = function ()
	{
		if ( this.pausemouseover ) {
			this.stop = 0;
		}
	};

}

scr = new NvChange();
//scr.name = "scr"; scr.height = 178; scr.width = 509; scr.height_i = 178; scr.width_i = 509;
scr.name = "scr"; scr.height = 256; scr.width = 514; scr.height_i = 256; scr.width_i = 514;
scr.scrollspeed = 4000; scr.pausedelay = 2000; scr.pausemouseover = true;
//scr.addImage("<a href=/event/200704.php><img src=/images/main/03.gif border=0></a>");
//scr.addImage("<a href=/sale/index.php?goods=event050><img src=/images/main/andre_mainbanner.jpg border=0></a>");
//scr.addImage("<a href=/sale/index.php?goods=event043><img src=/images/main/main_event043.jpg border=0></a>");
//scr.addImage("<a href=/event/event_sendback_4.php><img src=/images/main/netu_mainbn.jpg border=0></a>");
//scr.addImage("<a href=/event/event_sendback_4.php><img src=/images/main/ban1127mainbn_200802_1.jpg border=0></a>");
//scr.addImage("<a href=/event/event_sendback_4.php><img src=/images/main/ban1127mainbn_200802_2.jpg border=0></a>");
scr.addImage("<a href=/event/event_sendback_4.php><img src=/images/main/ban1127mainbn_200802_3_4.jpg border=0></a>");
//scr.addImage("<a href=/event/event_sendback_4.php><img src=/images/main/ban1127mainbn_200802_4.jpg border=0></a>");

//scr.addImage("<img src=/images/main/best5main_bn.gif border=0 usemap=#map_best5><map name=Map_best5><area shape=rect coords=14,38,248,221 href=/sale/index.php?goods=event053 alt=¸íÀÛ><area shape=rect coords=253,37,509,220 href=/sale/index.php?goods=event056 alt=Ã¢ÀÛ><area shape=rect coords=2,221,168,442 href=/sale/index.php?goods=event054 alt=²¿¸¶><area shape=rect coords=169,221,337,441 href=/sale/index.php?goods=event055 alt=ÀÚ¿¬><area shape=rect coords=338,222,510,441 href=/sale/index.php?goods=event050 alt=¾Óµå·¹></map>");
//scr.addImage("<img src=/images/main/main_bn_0725.jpg border=0 usemap=#0725><map name=0725 id=0725><area shape=rect coords=1,31,256,237 href=/mall/detail.php?goods=dbook011 alt=ÀÚ¿¬µµ°¨><area shape=rect coords=256,31,512,237 href=/mall/detail.php?goods=dbook012  alt=¹Ì¼ú°¡><area shape=rect coords=1,236,257,443 href=/mall/detail.php?goods=dbook013  alt=ÃÊµî³í¼ú><area shape=rect coords=257,236,512,442 href=/mall/detail.php?goods=dbook014  alt=¿ø¸®¼öÇÐ></map>");
//scr.addImage("<img src=/images/main/best_eng4.JPG border=0 usemap=#english><map name=nature id=english><area shape=rect coords=1,37,256,238 href=/sale/index.php?goods=event002 alt=¸¶ÀÌ1><area shape=rect coords=257,37,511,238 href=/sale/index.php?goods=event007 alt=¸¶ÀÌ2><area shape=rect coords=257,239,511,442 href=/sale/index.php?goods=event022 alt=¹Ì¾Ø><area shape=rect coords=2,239,255,442 href=/sale/index.php?goods=event014 alt=¸ÅÆ©></map>");
