
function goURL(str)

{

	var url = false;
	
	
	switch(str)

	{
		case "company1":
			url="./company/vision_mission.cfm";break;
		case "company2":
			url="./company/news_event_list.cfm";break;
		case "company3":
			url="./company/information.cfm";break;
		case "company4":
			url="./company/organization.cfm";break;
		case "company51":
			url="./company/branch_location.cfm";break;			
		case "company52":
			url="./company/branch_location_tokyo.cfm";break;			
		case "company53":
			url="./company/branch_location_seoul.cfm";break;			
		case "company54":
			url="./company/branch_location_shanghai.cfm";break;
		case "service11":
			url="./service/strategy_research.cfm";break;								
		case "service12":
			url="./service/strategy_research.cfm";break;									
		case "service13":
			url="./service/strategy_research2.cfm";break;									
		case "service14":
			url="./service/strategy_research1.cfm";break;									
		case "service15":
			url="./service/strategy_research3.cfm";break;										
		case "service21":
			url="./service/advisory_service.cfm";break;									
		case "service22":
			url="./service/annual_sub_01_1.cfm";break;										
		case "service23":
			url="./service/annual_sub_02_1.cfm";break;									
		case "service24":
			url="./service/annual_sub_03_1.cfm";break;									
		case "service25":
			url="./service/annual_sub_04_1.cfm";break;							
		case "service31":
			url="./service/strategy_reports.cfm";break;													
		case "service32":
			url="./service/Insight.cfm";break;									
		case "service33":
			url="./service/brief.cfm";break;									
		case "service34":
			url="./service/Issue.cfm";break;									
		case "service35":
			url="./service/online_db1.cfm";break;								
		case "service41":
			url="./service/forum.cfm";break;																					
		case "service42":
			url="./service/forum.cfm";break;									
		case "service43":
			url="./service/forum1.cfm";break;									
		case "service44":
			url="./service/forum2.cfm";break;									
		case "service45":
			url="./service/forum3.cfm";break;																				
		case "contact1":
			url="./contact/contact_info.cfm";break;							
		case "contact2":
			url="./contact/recruiting.cfm";break;								
		case "client1":
			url="./experiences/our_clients.cfm";break;									
		case "client2":
			url="./experiences/our_experiences.cfm";break;										


////////////////////////////// ¸ÞÀÎ³» advisory service ¸Þ´º ¸µÅ© /////////////////////////////////

// convergence market ///

		case "market1":
			url="./service/annual_sub_02_1.cfm";break;	
		case "market2":
			url="./service/annual_sub_02_2.cfm";break;	
		case "market3":
			url="./service/annual_sub_02_3.cfm";break;	
		case "market4":
			url="./service/annual_sub_02_4.cfm";break;	
		case "market5":
			url="./service/annual_sub_02_5.cfm";break;	
		
// convergence device ///
		
		case "device1":
			url="./service/annual_sub_01_1.cfm";break;	
		case "device2":
			url="./service/annual_sub_01_2.cfm";break;	
		case "device3":
			url="./service/annual_sub_01_3.cfm";break;	
		case "device4":
			url="./service/annual_sub_01_4.cfm";break;	
		case "device5":
			url="./service/annual_sub_01_5.cfm";break;	
		
// convergence technology ///
		
		case "tech1":
			url="./service/annual_sub_03_1.cfm";break;	
		case "tech2":
			url="./service/annual_sub_03_2.cfm";break;	
		case "tech3":
			url="./service/annual_sub_03_3.cfm";break;	
		case "tech4":
			url="./service/annual_sub_03_4.cfm";break;	
		case "tech5":
			url="./service/annual_sub_03_5.cfm";break;	


// country forecast ///
		
		case "forecast1":
			url="./service/annual_sub_04_1.cfm";break;	
		case "forecast2":
			url="./service/annual_sub_04_2.cfm";break;	
		case "forecast3":
			url="./service/annual_sub_04_3.cfm";break;	
		case "forecast4":
			url="./service/annual_sub_04_4.cfm";break;	
		case "forecast5":
			url="./service/annual_sub_04_5.cfm";break;
			
		case "banner01":
			test=window.open('http://www.researchonasia.com/korea/service/analysys.htm','','width=816,height=650,toolbar=0,status=0,fullscreen=0,menubar=0,scrollbars=1,resizable=0');
			return;
			break;

		case "banner02":
		//url="http://www.researchonasia.com/english";break;
			url="./service/report_list.cfm?category=6&glo=1";break;

		case "banner03":
			goURL2();return;
			
		case "home":
			url="./default.cfm";break;

	}

		if (url=='#')
		{
			alert("ÁØºñÁß.");
		} else {
		location.href = url;
		}
}

function goURL2(){
test=window.open('http://www.researchonasia.com/korea/service/ui_popup.htm','','width=800,height=650,toolbar=0,status=0,fullscreen=0,menubar=0,scrollbars=0,resizable=0');

}

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.add = function () {
		var text = arguments[0];
		this.item[this.itemcount] = text;
		this.itemcount = this.itemcount + 1;
	};

	this.addImage = function () {
		var text = arguments[0];
		this.item_i[this.item_icount] = text;
		this.item_icount = this.item_icount + 1;
	};

	this.start = function () {
		this.display();
		this.currentspeed = this.scrollspeed;
		obj = document.getElementById(this.name+'item0').style;
		obj.display='block';
		this.count++;
		setTimeout(this.name+'.scroll()',this.currentspeed);
	};

	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.display = function () {
		document.write('<div id="'+this.name+'" style="height:'+this.height+';width:'+this.width+';position:'+this.position+';overflow:hidden;" OnMouseOver="'+this.name+'.onmouseover();" OnMouseOut="'+this.name+'.onmouseout();">');
		for(var i = 0; i < this.itemcount; i++) {
				document.write('<div id="'+this.name+'item'+i+'"style="left:0px; width:'+this.width+';position:'+this.item_position+'; display:none; ">');
				document.write(this.item[i]);
				document.write('</div>');
		}
		document.write('</div>');
	};

	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;
		}
	};

	this.up = function ()
	{
		var i;
		this.stop++;

		if ( this.itemcount <= this.itemoffset )
			this.itemoffset = this.itemoffset % this.itemcount;

		for (i = 0; i < this.item_icount; i++) {
			obj_i = document.getElementById(this.name+'item_i'+i).style;
			if ( obj_i.display == "block" ) {this.item_ioffset = i+1;obj_i.display="none";}
		}

		if (this.item_icount > 0) {
			if (this.item_ioffset < this.item_icount) {
				obj_i = document.getElementById(this.name+'item_i'+this.item_ioffset).style;
				obj_i.display = "block";
			} else {
				obj_i = document.getElementById(this.name+'item_i0').style;
				obj_i.display = "block";
			}
		}
		for (i = 0; i < this.itemcount; i++) {
			obj = document.getElementById(this.name+'item'+i).style;
			if ( obj.display == "block" ) {this.itemoffset = i+1;obj.display="none";}
		}
		if (this.itemoffset < this.itemcount) {
			obj = document.getElementById(this.name+'item'+this.itemoffset).style;
			obj.display = "block";
		} else {
			obj = document.getElementById(this.name+'item0').style;
			obj.display = "block";
		}
		window.setTimeout(this.name + ".stop--;",this.pausedelay);
		//this.stop--;
	}

}


var movex = 0;
var movey = 0;
var xdiff = 0;
var ydiff = 0;
var ystart = 380;
var xstart = 0;
var deftop = 76;
var defleft = 430;

function setVariables() {
if (navigator.appName == "Netscape") {
	v=".top=";
	dS="document.";
	sD="";
	y="window.pageYOffset";
	}
	else {
	v=".pixelTop=";
	dS="";
	sD=".style";
	y="document.body.scrollTop";
   }
}

function checklocation() {
object="object1";
yy=eval(y);
eval(dS+object+sD+v+yy);
setTimeout("checklocation()",10);
}


function browser_size() {

	var winW = 630;
	var winH = 460;

	var w;

	if (parseInt(navigator.appVersion)>3) {
		if (navigator.appName=="Netscape") {
		  winW = window.innerWidth;
		  winH = window.innerHeight;
	}
	
	if (navigator.appName.indexOf("Microsoft")!=-1) {
	  winW = document.body.offsetWidth;
	  winH = document.body.offsetHeight;
		}
	}
	
	if (winW < 870 ) {
		w = 870;
	}
	else {
		w = (winW / 2) + 420;
	}
		
	eval(object1.style.pixelLeft=w);
	
}
