//	¿ÀÅä¿¡¹ö½Ã½ºÅÛÁî ¹öÆ° Å¬¸¯ ºÐ±â(Æ®·¡Å·)
//	ÀÛ¼ºÀÚ : ÇÏÁ¾¸í
//	ÀÛ¼ºÀÏ : 2007.11.29
	

// # Æ®·¡Å· ¹öÆ°º° È£Ãâ : eventALL
function button_click(buttonCode){
	//document.nullframe.location.href="http://cerato.kia.co.kr/cerato_redirect.asp?wt_event=cerato0708&wt_site=home&wt_location="+locationValue;	//Æ®·¡Å·
	switch(buttonCode)	{
		case "hyundailogo" :
			window.open("http://www.hyundai-motor.com/index.html","_blank","");
			WriteLog('03');
			return;
		case "carlogo" :
			window.open("http://ad.hyundai-motor.com/catalog/santafe/index.html","_blank","");
			WriteLog('02');
			return;
		case "gogallery" :
			location.href="./event_gallery.asp"
			WriteLog('07');
			return;
		case "luxediton" :
			window.open('./luxedition.htm','_blank','scrollbars=no,toolbar=no,location=no,status=no,menubar=no,resizable=no,width=759,height=640,left=0,top=0');
			WriteLog('06');
			return;
		case "prizelist" :
			window.open('./popupPrize.htm','_blank','scrollbars=no,toolbar=no,location=no,status=no,menubar=no,resizable=no,width=650,height=600,left=0,top=0');
			WriteLog('10');
			return;
		case "gomain" :
			location.href="./event_main.asp"
			WriteLog('08');
			return;
		case "goindex" :
			location.href="./event_index.asp"
			WriteLog('04');
			return;
		case "gologin" :
			window.open('http://www.hyundai-motor.com/hmcevent/20071204_Santafe_BlackWhite/comas_prize.asp','prize','scrollbars=no,toolbar=no,location=no,status=no,menubar=no,resizable=no,width=702,height=500,left=10,top=10');
			WriteLog('11');
			return;
	}
	return;
}

// # »çÁø Å¬¸¯ : event_main
function photo_click(photoCode){
	WriteLog('12');
	window.open('http://www.hyundai-motor.com/hmcevent/20071204_Santafe_BlackWhite/comas_popup.asp?photoCode='+photoCode+'&v3='+url.value,'event','scrollbars=no,toolbar=no,location=no,status=no,menubar=no,resizable=no,width=702,height=600,left=10,top=10');
	//window.open('./event_popup.asp?photoCode='+photoCode,'event','scrollbars=no,toolbar=no,location=no,status=no,menubar=no,resizable=no,width=702,height=688,left=10,top=10');
	return;
}

// # ´Ù¿î·ÎµåFILE : event_gallery
function goDownload(fileName){
	if (fileName.substring(0,9) == "wallpaper") {
		fileSelect = fileName;
		for (i=0;i<selectImg.length;i++) {
			if(selectImg[i].checked){
				fileName = selectImg[i].value;
			}
		}
		fileName = fileSelect+"_"+fileName;
	}
	switch(fileName)	{
		case "cf_blk.mpg" :
			WriteLog('14');
			break;
		case "cf_wht.mpg" :
			WriteLog('15');
			break;
		case "wallpaper_1280_wht.jpg" :
			WriteLog('16');
			break;
		case "wallpaper_1024_wht.jpg" :
			WriteLog('17');
			break;
		case "wallpaper_1280_blk.jpg" :
			WriteLog('18');
			break;
		case "wallpaper_1024_blk.jpg" :
			WriteLog('19');
			break;
		case "wallpaper_1280_blkwht.jpg" :
			WriteLog('20');
			break;
		case "wallpaper_1024_blkwht.jpg" :
			WriteLog('21');
			break;
		case "screensaver.exe" :
			WriteLog('22');
			break;
	}	
	location.href="attachdown.asp?filename=santafe_"+fileName;
}

// # ÇÃ·¡½¬¹«ºñ¼±ÅÃ : event_gallery
function changeCF(flashName){
	document.getElementById("flash_mov").innerHTML = "<iframe src='./event_gallery_mov.asp?mov="+flashName+"' frameborder='0' border='0' width='286' height='190'></iframe>"
}


// # ÆË¾÷Ã¢ ´Ý±â
function popClose(){
	self.close();
}

// # ·Î±× ½×±â
function WriteLog(a) {
	HiddenFrame.location.href="http://santafe.hyundai-motor.com/santafe0712_redirect.asp?menu="+a;
}