
/**************** SSL ½ÃÀÛ **************************/

var url = document.URL;

//SSL Àû¿ëµÇ´Â ÆäÀÌÁö¸¦ ³Ö´Â´Ù.


var sslFiles = "NewsLetterUserAdd.aspx";
				


//ÇöÀç ÆäÀÌÁö¸í
var curFile = url.substring(url.split('?')[0].lastIndexOf("/") + 1, url.indexOf("?") > 0 ? url.split('?')[0].length : url.length);

var isSSL = false;


	if(curFile == sslFiles) { //ÇöÀç ÆäÀÌÁö°¡ SSLÆäÀÌÁö°¡ ¸Â´Ù.
		
		if(location.protocol == 'http:') {
			
			var domain = "http://" + location.hostname;
						
			location.replace("https://news.hyundai-kiamotors.com:455" + url.substring(domain.length, url.length));
		}
		
		isSSL = true;
		
		
	}


if(!isSSL) { //SSLÆäÀÌÁö°¡ ¾Æ´Ï¸é

	if(location.protocol == 'https:') { //ÇöÀç httpsÀÌ¸é
	
	
		var domain = "https://" + location.host;
	
		location.replace("http://" + location.hostname + url.substring(domain.length, url.length));
	}
}



/**************** SSL Á¾·á **************************/



function movieView_(src,SizeX,SizeY)
{
 html = '';
	//html += '<object classid="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95" codeBase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,5,715" id="Player" type="application/x-oleobject" width="'+SizeX+'" height="'+SizeY+'" standby="Loading Microsoft Windows Media Player components...">';
	//html += '<param name="FileName" value="'+src+'">';
	//html += '<param name="autoStart" value="0">';
	//html += '<param name="showControls" value="0">';
 html += '<embed type="application/x-mplayer2" pluginspage="http://www.microsoft.com/Windows/Downloads/Contents/Products/MediaPlayer/" id="Player" name="Player" src="'+src+'" width="'+SizeX+'" height="'+SizeY+'" autostart="1" showcontrols="0"></embed>';
 //html += '</object>';
 document.write(html);
}

function movieView2(src)
{
 html = '';
 html += '<object classid="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95" codeBase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,5,715" id="Player" type="application/x-oleobject" standby="Loading Microsoft Windows Media Player components...">';
 html += '<param name="FileName" value="'+src+'">';
 html += '<param name="autoStart" value="1">';
 html += '<param name="showControls" value="1">';
 html += '<param name="wmode" value="transparent">';
 html += '<param name="windowlessVideo" value="true">';
 html += '<embed type="application/x-mplayer2" pluginspage="http://www.microsoft.com/Windows/Downloads/Contents/Products/MediaPlayer/" name="Player" src="'+src+'" windowlessVideo="true" autostart="1" showcontrols="1"></embed>';
 html += '</object>';
 document.write(html);
}


function movieView(src,w,h)
{
	html = '';
	html += '<object classid="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95" codeBase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,5,715" id="player" type="application/x-oleobject" width="'+w+'" height="'+h+'" standby="Loading Microsoft Windows Media Player components..." VIEWASTEXT>';
	html += '<param name="FileName" value="'+src+'">';
	html += '<param name="ShowControls" value="1">';
	html += '<param name="ShowTracker" value="1">';
	html += '<param name="ShowAudioControls" value="1">';
	html += '<param name="ShowPositionControls" value="1">';
	html += '<param name="AutoStart" value="1">'
  html += '<param name="EnableContextMenu" value="1">';
	html += '<embed type="application/x-mplayer2" pluginspage="http://www.microsoft.com/Windows/Downloads/Contents/Products/MediaPlayer/" name="player" src="'+src+'" autostart="1" showcontrols="1"></embed>';
	html += '</object>';
	document.write(html);
}

//movie avi player 
function movieViewAvi(src,w,h)
{
 	html = '';
	html += '<object classid="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95" codeBase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,5,715" id="player" type="application/x-oleobject" width="'+w+'" height="'+h+'" standby="Loading Microsoft Windows Media Player components..." VIEWASTEXT>';
	html += '<param name="FileName" value="'+src+'">';
	html += '<param name="DisplaySize" value="3">';
	html += '<param name="EnableFullScreenControls" value="0">';
	html += '<param name="ShowControls" value="1">';
	html += '<param name="ShowTracker" value="1">';
	html += '<param name="ShowAudioControls" value="1">';
	html += '<param name="ShowStatusBar" value="0">';
	html += '<param name="ShowDisplay" value="0">';
	html += '<param name="ShowCaptioning" value="0">';
	html += '<param name="ShowPositionControls" value="1">';
	html += '<param name="SetCurrentEntry" value="1">';
	html += '<param name="ClickToPlay" value="0">';
	html += '<param name="AutoSize" value="0">';
	html += '<param name="AutoStart" value="1">';
	html += '<param name="EnableContextMenu" value="1">';
	html += '<param name="wmode" value="transparent">';
	html += '<param name="windowlessVideo" value="1">';
	html += '<embed type="application/x-mplayer2" pluginspage="http://www.microsoft.com/Windows/Downloads/Contents/Products/MediaPlayer/" name="player" src="'+src+'" wmode="transparent" autostart="1" showcontrols="1" windowlessVideo="1"></embed>';
	html += '</object>';
	document.write(html);
}

//movie Asf player
function movieViewAsf(src,w,h)
{
 	html = '';
	html += '<object classid="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95" codeBase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,5,715" id="player" type="application/x-oleobject" width="'+w+'" height="'+h+'" standby="Loading Microsoft Windows Media Player components..." VIEWASTEXT>';
	html += '<param name="FileName" value="'+src+'">';
	html += '<param name="DisplaySize" value="3">';
	html += '<param name="EnableFullScreenControls" value="0">';
	html += '<param name="ShowControls" value="1">';
	html += '<param name="ShowTracker" value="1">';
	html += '<param name="ShowAudioControls" value="1">';
	html += '<param name="ShowStatusBar" value="0">';
	html += '<param name="ShowDisplay" value="0">';
	html += '<param name="ShowCaptioning" value="0">';
	html += '<param name="ShowPositionControls" value="1">';
	html += '<param name="SetCurrentEntry" value="1">';
	html += '<param name="ClickToPlay" value="0">';
	html += '<param name="AutoSize" value="0">';
	html += '<param name="AutoStart" value="1">';
	html += '<param name="EnableContextMenu" value="1">';
	html += '<param name="wmode" value="transparent">';
	html += '<param name="windowlessVideo" value="1">';
	html += '<embed type="application/x-mplayer2" pluginspage="http://www.microsoft.com/Windows/Downloads/Contents/Products/MediaPlayer/" name="player" src="'+src+'" wmode="transparent" autostart="1" showcontrols="1" windowlessVideo="1"></embed>';
	html += '</object>';
	document.write(html);
}

function movieViewAvi2(src)
{
 html = ''; 
 html += '<embed src="'+src+'" type="video/avi" href="'+src+'" autostart="1" wmode="transparent" windowlessVideo="true" id="player" volume="-150"></embed>';
 html += '</object>';
 document.write(html);
}

function movieViewAsf2(src)
{
 html = ''; 
 html += '<embed src="'+src+'" type="video/x-ms-asf" href="'+src+'"  autostart="1" wmode="transparent" windowlessVideo="true" id="player" volume="-150"></embed>'; 
 html += '</object>';
 document.write(html);
}

//movie flv player
function moviewView3(flvM,jpgM)
{
	document.write("\
		<object width='455' height='390' name='UccView' classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0' id='player' volume='-150'>\
			  <param name='allowScriptAccess' value='sameDomain' />\
			  <param name='movie' value='/img/flash/VF_flv3.swf?flvM="+flvM+"&jpgM="+jpgM+"' />\
			  <param name='quality' value='high' />\
			  <param name='Volume' value='-150'>\
			  <param name='wmode' value='transparent' />\
			  <embed width='455' height='390' src='/images/flash/VF_flv3.swf?1flvM="+flvM+"&jpgM="+jpgM+"' quality='high' bgcolor='#FFFFFF' name='UccView' align='middle' allowScriptAccess='sameDomain' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' wmode='transparent' id='player' volume='-150' />\
		</object>\
	");
}

function mainVisual_(swfFile,w,h){
			document.write("\
				<object width='"+w+"' height='"+h+"' classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0' NAME='link' ID='link'>\
					  <param name='allowScriptAccess' value='sameDomain' />\
					  <param name='movie' value='"+swfFile+"' />\
					  <param name='quality' value='high' />\
					  <PARAM name='wmode' value='transparent' />\
					  <embed width='"+w+"' height='"+h+"' src='"+swfFile+"' quality='high' bgcolor='#FFFFFF' align='middle' allowScriptAccess='sameDomain' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' />\
				</object>\
			");
		} 

function mainVisual()
 {   
 		var flvStr = '<object classid=clsid:d27cdb6e-ae6d-11cf-96b8-444553540000 codebase=http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0 width=100% height=920 id=z_navi align=middle><param name=allowScriptAccess value=sameDomain>'
	 	flvStr = flvStr + '<param name=movie value="/img/flash/nw_main.swf">'
	 	flvStr = flvStr + '<param name=quality value=high>'
	 	flvStr = flvStr + '<param name=allowScriptAccess value=sameDomain>'
	 	flvStr = flvStr + '<param name=wmode value=transparent>'
	 	flvStr = flvStr + '<embed src="/img/flash/nw_main.swf" wmode=transparent quality=high width=100% height=920 name=z_navi align=middle allowScriptAccess=sameDomain type=application/x-shockwave-flash pluginspage=http://www.macromedia.com/go/getflashplayer></embed>'
	 	flvStr = flvStr + '</object>'
	 	
	 	document.all.fl.innerHTML = flvStr;
 }
 
/* ¸ÞÀÎ & ¼­ºê ¸Å´º ¸µÅ©*/

function mNum(a){
	if(a==10){ //°øÁö»çÇ×
		location.href = "/Notice/NoticeList.aspx";
	}else if(a==11){//°øÁö»çÇ×
		location.href = "/Notice/NoticeList.aspx";
	}else if(a==12){//ÀÌº¥Æ®
		location.href = "/Notice/Event.aspx";
	}else if(a==13){//»çÀÌÆ® ¼Ò°³
		location.href = "/Notice/company.aspx";
	}else if(a==20){//´º½º
		location.href = "/News/NewsList.aspx";
	}else if(a==21){//º¸µµÀÚ·á
		location.href = "/News/NewsList.aspx";
	}else if(a==22){//µ¿¿µ»ó ´º½º
		location.href = "/News/ImgNewsList.aspx";
	}else if(a==23){//ÇÖ ÀÌ½´
		location.href = "/News/HotIssueList.aspx";
	}else if(a==24){//´º½º·¹ÅÍ
		location.href = "/News/NewsLetterList.aspx";
	}else if(a==30){//»çº¸
		location.href = "/Paper/MotorsList.aspx";
	}else if(a==31){//¸ðÅÍ½º¶óÀÎ
		location.href = "/Paper/MotorsList.aspx";
	}else if(a==32){//Çö´ë`±â¾ÆÀÚµ¿Â÷±×·ì »çº¸
		location.href = "/Paper/PaperList.aspx";
	}else if(a==40){//ÆÐ¹Ð¸®»çÀÌÆ®
		location.href = "/Family/FamilyList.aspx";
	}
}

//·Î°í
function goHome(){
	location.href="/";
}
//´º½º·¹ÅÍ ½ÅÃ»
function newsGo(){
	location.href="/News/NewsLetterUserAdd.aspx";
}
//À¥Áø»çº¸ 01
function newsSB_01(){
	location.href="/Paper/MotorsList.aspx";
} 
//À¥Áø»çº¸ 02
function newsSB_02(){
	location.href="/Paper/PaperList.aspx";
}
//RSS
function rss(){
	window.open("/RSS.aspx","rss","width=600px,height=600px");	
}
//»çÀÌÆ®¸Ê
function bot_01(){
	location.href="/sitemap/sitemap.aspx";
}
//CONTACT US
function bot_02(){
	location.href="/Family/ContactUs.aspx";
}
//°³ÀÎÁ¤º¸Ãë±Þ¹æÄ§
function bot_03(){
	window.open("/Popup/privacy.html","privacy","width=600px,height=700px,left=0,top=0,status=no,scrollbars=no");
}