
/**********************************************************************************
Table column Color change Module
param : Ä®¶ó°ª
***********************************************************************************/
function changeto(highlightcolor)
{
    source=event.srcElement;

	while(source.tagName!="TR")
	source=source.parentElement;
	if (source.style.backgroundColor!=highlightcolor&&source.id!="ignore")
    source.style.backgroundColor=highlightcolor;
}

/**********************************************************************************
Popup Á¤ÀÇ
º¯¼ö Á¤ÀÇ : pop - ÆÄÀÏ¸í, width - °¡·Î»çÀÌÁî, height - ¼¼·Î»çÀÌÁî, flag - 0:½ºÅ©·Ñ¾øÀ½, 1:½ºÅ©·ÑÀÖÀ½
***********************************************************************************/
function pop(pop,width,height,flag,name)
{
	var url = pop;
	var wd = width;
	var he = height;
	var pName = (name!=null) ? name : "";

    if (flag == "0" )
    {  window.open(url,pName,"left=0,top=0,toolbar=0,menubar=0,scrollbars=no,resizable=no,width=" + wd +",height=" + he + ";");  }
    else
    {  window.open(url,pName,"left=0,top=0,toolbar=0,menubar=0,scrollbars=yes,resizable=no,width=" + wd +",height=" + he + ";");  }
}

/****** ÆË¾÷Ã¢ ¸®»çÀÌÁî **************************************************************/
function popResize() {
	var thisX = document.getElementById("offsetTable").offsetWidth;
	var thisY = document.getElementById("offsetTable").offsetHeight;
	var maxThisX = screen.width - 50;
	var maxThisY = screen.height - 80;

	if (window.navigator.userAgent.indexOf("SV1") != -1){
		var marginY =  58; //¸¶Áö¸· ¼ö´Â »óÈ²¿¡µû¶ó ¾Ë¸Â°Ô ³ÖÀ¸¼¼¿ä. (ÅÛÇÃ¸´ÀÇ Çì´õ³ôÀÌ + Ç²ÅÍ ³ôÀÌ + ¾ËÆÄ)
		} else {
		var marginY = 29; //¸¶Áö¸· ¼ö´Â »óÈ²¿¡µû¶ó ¾Ë¸Â°Ô ³ÖÀ¸¼¼¿ä. (ÅÛÇÃ¸´ÀÇ Çì´õ³ôÀÌ + Ç²ÅÍ ³ôÀÌ + ¾ËÆÄ)
		}


	var scrollbarValue = "no";

	if (thisX > maxThisX) {
		scrollbarValue = "yes";
		thisX = maxThisX;
	}
	if (thisY > maxThisY - marginY) {
		scrollbarValue = "yes";
		thisX += 19;
		thisY = maxThisY - marginY;
	}
	window.document.body.scroll = scrollbarValue;
	window.resizeTo(thisX+10,thisY+marginY);

	var windowX = (screen.width - (thisX+10))/2;
	var windowY = (screen.height - (thisY+marginY))/2 - 20;

}
//-->

/**************************************************
Image Rollover Module
**************************************************/
function EImgChg(flag)
{
    source=event.srcElement;
    if (source.name == "")
    { return false;  }

    else if (document.images && source.tagName=="IMG") {
        imgElement = source.name;  // ÀÌ¹ÌÁö name
        imgPath = source.src;   // ÀÌ¹ÌÁö src ¼Ó¼º°ª

        imgPathLen = imgPath.length;
        imgPathFlag = imgPath.lastIndexOf("/");
        imgName = imgPath.substring(0,imgPathFlag+1);

        document.images[imgElement].src =  imgName + imgElement + "_" + flag + ".gif";  }
}

/**************************************************
¸µÅ©½Ã ¶óÀÎ ¾ø¾Ö±â
**************************************************/
function allblur() {
    for (i = 0; i < document.links.length; i++)
        document.links[i].onfocus = document.links[i].blur;
}
window.onload=allblur


/**************************************************
¹öÆ° Å¬¸¯½Ã ¹öÆ°ÀÌ¹ÌÁö & ÄÁÅÜÃ÷ ³»¿ë DIV Change
***************************************************
	- ¹öÆ°ÀÌ¹ÌÁö name : ¹öÆ°name + 1,2,3, ....<br>
	- ·¹ÀÌ¾î name : div + ¹öÆ°ÀÌ¹ÌÁö name<br><br>

	* ÇÔ¼ö¿øÇü : div_click(img_no,img_cnt,img_path,bt_name)
	- img_no :  È°¼ºÈ­ µÉ ÀÌ¹ÌÁö¹öÆ°ÀÇ ÀÎÀÚ°ª
	- img_cnt :  Àû¿ëµÇ´Â ÀÌ¹ÌÁö¹öÆ°ÀÇ °¹¼ö
	- img_path :  ¹öÆ°ÀÌ¹ÌÁöÀÇ °æ·Î°ª
	- bt_name :   ¹öÆ°ÀÌ¹ÌÁöÀÇ id, name°ª
**************************************************/
function div_click(img_no,img_cnt,img_path,bt_name) {
	var img_default = Array();
	var div_default = Array();
	var last_no = img_cnt; 			// ¸Þ´º°¹¼ö

	if (img_default.length == 0) {
		for (i = 1; i <= last_no; i++) 		{
			img_default[i] = img_path + i + '_off.gif';
			div_default[i] = 'none';	     }
	}

	for (i = 1; i <= last_no; i++) {
		img_default[i] = img_path + i + '_off.gif';
		div_default[i] = 'none'; 		}
	img_default[img_no] =img_path + img_no + '_on.gif';
	div_default[img_no] ='';

	for (i = 1; i <= last_no; i++) {
		menu_str =bt_name + i;
		div_str = 'div_' + bt_name + i;

		document.images[menu_str].src = img_default[i];
		document.getElementById(div_str).style.display = div_default[i];  		}
}


/**************************************************
ÀÌ¹ÌÁö ºä¾î Change
***************************************************
	- ¹öÆ°ÀÌ¹ÌÁö name : ¹öÆ°name + 1,2,3, ....<br>

	* ÇÔ¼ö¿øÇü : div_click(img_no,img_cnt,img_path,bt_name)
	- img_no :  È°¼ºÈ­ µÉ ÀÌ¹ÌÁö¹öÆ°ÀÇ ÀÎÀÚ°ª
	- img_cnt :  Àû¿ëµÇ´Â ÀÌ¹ÌÁö¹öÆ°ÀÇ °¹¼ö
	- img_path :  ¹öÆ°ÀÌ¹ÌÁöÀÇ °æ·Î°ª
	- bt_name :   ¹öÆ°ÀÌ¹ÌÁöÀÇ id, name°ª
**************************************************/
function img_click(img_no,img_cnt,img_path,bt_name) {
	var img_default = Array();
	var last_no = img_cnt; 			// ¸Þ´º°¹¼ö

	if (img_default.length == 0) {
		for (i = 1; i <= last_no; i++) 		{
			img_default[i] = img_path + i + '_off.gif';	  }
	}

	for (i = 1; i <= last_no; i++) {
		img_default[i] = img_path + i + '_off.gif';			 		}
	img_default[img_no] =img_path + img_no + '_on.gif';
	document.images['bimg'].src = 'img/bimg' + img_no + '.gif';  // changeµÉ ÀÌ¹ÌÁö¿µ¿ª

	for (i = 1; i <= last_no; i++) {
		menu_str =bt_name + i;
		document.images[menu_str].src = img_default[i];			  		}
}

/**************************************************
FAQ »ç¿ë¸ðµâ
***************************************************
	* ÇÔ¼ö¿øÇü : cmdisplay(cstr,cdflag)
	- cstr : »ç¿ëÇÒ ·¹ÀÌ¾îÀÌ¸§
	- cdflag : ·¹ÀÌ¾î Á¦¾î º¯¼ö°ª ("0"ÀÌ¸é ¿­¸° ·¹ÀÌ¾î ´­·¯µµ ¾È ´ÝÈû / "1"ÀÌ¸é ¿­¸° ·¹ÀÌ¾î ´­¸£¸é ´ÝÈû)
**************************************************/
var cmz=0;
var ctFlag="";
function cmdisplay(cstr,cdflag)
{  cmnum = cstr.substring(cstr.length - 2);
    cmstr = cstr.substring(0, cstr.length - 2);

// Browser type : Explore
    if (cdflag == "0" & document.all[cmstr+cmnum].style.display=="")
    {  return;     }
    else
    {
        if(document.all[cmstr+cmnum].style.display=="")
        {
            document.all[cmstr+cmnum].style.display="none";
            ctFlag = eval("txt" + cmnum);
            ctFlag.style.fontWeight = "normal";
            ctFlag.style.color = "#666666";
            cmz=0;
        }
        else
        {
            ctFlag = eval("txt" + cmnum);
            ctFlag.style.fontWeight = "bold";
			ctFlag.style.color = "#4880B6";
            if(cmz != 0)
            {
                document.all[cmstr+cmz].style.display="none";
                ctFlag = eval("txt" + cmz);
                ctFlag.style.fontWeight = "normal";
                ctFlag.style.color = "#666666";

                document.all[cmstr+cmnum].style.display="";
                ctFlag = eval("txt" + cmnum);
                ctFlag.style.fontWeight = "bold";
				ctFlag.style.color = "#4880B6";
            }
            document.all[cmstr+cmnum].style.display="";
            cmz=cmnum;
        }
    }
}


/**************************************************
ÇÃ·¡½¬ GNB ¸µÅ© °ü·Ã
**************************************************/

/*******************************/
/****  VOLVO  ****/
/*******************************/
/** paper **/
function paper()  {		window.location.href = "/paper/paper_search.asp";		}
function paper_1()  {		window.location.href = "/paper/paper_search.asp";		}
function paper_2()  {		window.location.href = "/paper/paper_new.asp";		}
function paper_3()  {		window.location.href = "/paper/paper_atoz.asp";		}

/** eco **/
function eco()  {		    window.location.href = "/ecopaper/ecolead.asp";		}
function eco_1()  {		window.location.href = "/ecopaper/ecolead.asp";		}
function eco_2()  {		window.location.href = "/ecopaper/ecopaper.asp";		}
//function eco_2()  {		window.alert("ÁË¼ÛÇÕ´Ï´Ù. ÇöÀç º» ¼­ºñ½º´Â ÀÌ¿ëÇÏ½Ç ¼ö ¾ø½À´Ï´Ù.");		}

/** help **/
function help()  {		window.location.href = "/help/custom_qna.asp";		}
function help_1()  {		window.location.href = "/help/custom_qna.asp";		}
function help_2()  {		window.location.href = "/help/custom_faq.asp";		}
function help_3()  {		window.location.href = "/help/mailing.asp";		}
function help_4()  {		window.location.href = "/help/sample.asp";		}

/** About **/
function about()  {		window.location.href = "/about/about.asp";		}
function about_1()  {		window.location.href = "/about/about.asp";		}
function about_2()  {		window.location.href = "/about/map.asp";		}
function about_3()  {		window.location.href = "/about/notice.asp";		}

/** gallery **/
function gallery()  {		window.location.href = "/gallery/new.asp";		}
function gallery_1()  {		window.location.href = "/gallery/new.asp";		}
function gallery_2()  {		window.location.href = "/gallery/about.asp";	}
function gallery_3()  {		window.location.href = "/gallery/visit.asp";	}

/** Products **/
function products()  {		products_1()		}
function products_1()  {		products_1_s01(); 		}
	function products_1_s01()  {		window.location.href = "/products/new_s80/intro/intro01.asp";		 }
	function products_1_s02()  {		window.location.href = "/products/new_s80/exterior/exterior01.asp";		}
	function products_1_s03()  {		window.location.href = "/products/new_s80/interior/interior01.asp";		}
	function products_1_s04()  {		window.location.href = "/products/new_s80/spec/spec01.asp";		}
	function products_1_s05()  {		window.location.href = "/products/new_s8/performance/performance01.asp";		}
	function products_1_s06()  {		window.location.href = "/products/new_s80/safety/safety01.asp";		}
function products_2()  {		products_2_s01()		}
	function products_2_s01()  {		window.location.href = "/products/s60/intro/intro01.asp";		}
	function products_2_s02()  {		window.location.href = "/products/s60/exterior/exterior01.asp";		}
	function products_2_s03()  {		window.location.href = "/products/s60/interior/interior01.asp";		}
	function products_2_s04()  {		window.location.href = "/products/s60/spec/spec01.asp";		}
	function products_2_s05()  {		window.location.href = "/products/s60/performance/performance01.asp";		}
	function products_2_s06()  {		window.location.href = "/products/s60/safety/safety01.asp";		}
function products_3()  {		products_3_s01()		}
	function products_3_s01()  {		window.location.href = "/products/s40/intro/intro01.asp";		}
	function products_3_s02()  {		window.location.href = "/products/s40/exterior/exterior01.asp";		}
	function products_3_s03()  {		window.location.href = "/products/s40/interior/interior01.asp";		}
	function products_3_s04()  {		window.location.href = "/products/s40/spec/spec01.asp";		}
	function products_3_s05()  {		window.location.href = "/products/s40/performance/performance01.asp";		}
	function products_3_s06()  {		window.location.href = "/products/s40/safety/safety01.asp";		}
function products_4()  {		products_4_s01()		}
	function products_4_s01()  {		window.location.href = "/products/xc90/intro/intro01.asp";		}
	function products_4_s02()  {		window.location.href = "/products/xc90/exterior/exterior01.asp";		}
	function products_4_s03()  {		window.location.href = "/products/xc90/interior/interior01.asp";		}
	function products_4_s04()  {		window.location.href = "/products/xc90/spec/spec01.asp";		}
	function products_4_s05()  {		window.location.href = "/products/xc90/performance/performance01.asp";		}
	function products_4_s06()  {		window.location.href = "/products/xc90/safety/safety01.asp";		}
function products_5()  {		products_5_s01()		}
	function products_5_s01()  {		window.location.href = "/products/xc70/intro/intro01.asp";		}
	function products_5_s02()  {		window.location.href = "/products/xc70/exterior/exterior01.asp";		}
	function products_5_s03()  {		window.location.href = "/products/xc70/interior/interior01.asp";		}
	function products_5_s04()  {		window.location.href = "/products/xc70/spec/spec01.asp";		}
	function products_5_s05()  {		window.location.href = "/products/xc70/performance/performance01.asp";		}
	function products_5_s06()  {		window.location.href = "/products/xc70/safety/safety01.asp";		}
function products_6()  {		products_6_s01()		}
	function products_6_s01()  {		window.location.href = "/products/v50/intro/intro01.asp";		}
	function products_6_s02()  {		window.location.href = "/products/v50/exterior/exterior01.asp";		}
	function products_6_s03()  {		window.location.href = "/products/v50/interior/interior01.asp";		}
	function products_6_s04()  {		window.location.href = "/products/v50/spec/spec01.asp";		}
	function products_6_s05()  {		window.location.href = "/products/v50/performance/performance01.asp";		}
	function products_6_s06()  {		window.location.href = "/products/v50/safety/safety01.asp";		}
function products_7()  {		products_7_s01()		}
	function products_7_s01()  {		window.location.href = "/products/c70/intro/intro01.asp";		}
	function products_7_s02()  {		window.location.href = "/products/c70/exterior/exterior01.asp";		}
	function products_7_s03()  {		window.location.href = "/products/c70/interior/interior01.asp";		}
	function products_7_s04()  {		window.location.href = "/products/c70/spec/spec01.asp";		}
	function products_7_s05()  {		window.location.href = "/products/c70/performance/performance01.asp";		}
	function products_7_s06()  {		window.location.href = "/products/c70/safety/safety01.asp";		}
function products_8()  {		products_8_s01()		}
	function products_8_s01()  {		window.location.href = "/products/c30/intro/intro01.asp";		}
	function products_8_s02()  {		window.location.href = "/products/c30/exterior/exterior01.asp";		}
	function products_8_s03()  {		window.location.href = "/products/c30/interior/interior01.asp";		}
	function products_8_s04()  {		window.location.href = "/products/c30/spec/spec01.asp";		}
	function products_8_s05()  {		window.location.href = "/products/c30/performance/performance01.asp";		}
	function products_8_s06()  {		window.location.href = "/products/c30/safety/safety01.asp";		}
function products_9()  {		products_9_s01()		}
	function products_9_s01()  {		window.location.href = "/products/d5/intro/intro01.asp";		}
	function products_9_s02()  {		window.location.href = "/products/d5/spec/spec01.asp";		}

function products_10()  {		window.location.href = "/products/accessory/accessory.asp";		}
function products_11()  {		window.location.href = "/products/brochure/brochure.asp";		}



/** Mypage **/
function mypage()  {		window.location.href = "/mypage/main.asp";		}
function mypage_1()  {		window.location.href = "/mypage/reglist/my_request_list.asp";		}
function mypage_2()  {		window.location.href = "/mypage/ask/my_inquire_list.asp";		}
function mypage_3()  {		window.location.href = "/mypage/modify/member_modify.asp";		}
function mypage_4()  {		window.location.href = "/mypage/secede/member_out.asp";		}

/** Registration **/
function registration_1()  {		window.location.href = "/etc/login/login.asp";		}
function registration_2()  {		window.location.href = "/etc/member/idfind.asp";		}
function registration_3()  {		window.location.href = "/etc/member/join_step01.asp";		}
function registration_4()  {		window.location.href = "/etc/member/clause.asp";		}
function registration_5()  {		window.location.href = "/etc/member/privacy.asp";		}
function registration_6()  {		sitemap()		}

/** OwnersClub **/
function ownerclub_1()  {		window.location.href = "/etc/ownerclub/notice_list.asp";		}
function ownerclub_2()  {		window.location.href = "/etc/ownerclub/freeboard_list.asp";		}
function ownerclub()  {		ownerclub_1()		}

function home()  {		window.location.href = "/default.asp";		}
function login()  {		window.location.href = "/etc/login/login.asp";		}
function logout()  {		window.location.href = "/etc/login/logout.asp";		} //·Î±×¾Æ¿ô Ãß°¡
function join()  {		registration_3();		}
function sitemap()	  {		window.location.href = "/etc/sitemap/sitemap.asp";		}
/*//////////////////////////////////////////////////////////////////////////////////////*/
