var locationPort = window.location.port;
var ordHttpDomain;	//ÀÏ¹Ýµµ¸ÞÀÎ
var ordSslDomain;	//SSLµµ¸ÞÀÎ

if ( locationPort.length > 0 ) {
	ordHttpDomain = "http://www.interpark.com:"+locationPort;
	ordSslDomain = "https://www.interpark.com:"+locationPort;
} else {
	ordHttpDomain = "http://www.interpark.com";
	ordSslDomain = "https://www.interpark.com";
}

// ±âº» ÇÔ¼ö
var isDOM = (document.getElementById ? true : false);
var isIE4 = ((document.all && !isDOM) ? true : false);
var isNS4 = (document.layers ? true : false);
var isNS = navigator.appName == "Netscape";
/////////////////////////////////////////////////////////////////////////////////////////////////
/*************************************** onLoad ÇÔ¼ö ½ÃÀÛ ***************************************/
/////////////////////////////////////////////////////////////////////////////////////////////////

function array_push(array, val)
{
	var length = array.length ;
	array[length] = val ;
}

var onload_func = new Array() ;

window.onload = function()
{
	for ( cnt = 0 ; cnt < onload_func.length ; cnt++ )
	{
		eval(onload_func[cnt]);
	}
	setInterparkSNO();
	document.onfocusin=bluring;
}

//javascript·Î ±¸ÇöÇÑ Request
function fn_request(valuename) {
    var rtnval;
    var nowAddress = unescape(location.href);
    var parameters = new Array();

    parameters = (nowAddress.slice(nowAddress.indexOf("?")+1,nowAddress.length)).split("&");

    for (var i = 0; i < parameters.length; i++) {
        if (parameters[i].indexOf(valuename) != -1) {
            rtnval = parameters[i].split("=")[1];
            if (rtnval == undefined || rtnval == null) {
                rtnval = "";
            }
            return rtnval;
        }
    }
}

//ÆÇ¸ÅÀÚ °æ·Î ºÐ¼®°ª ¼³Á¤
function setInterparkSNO() {
	var mainURL = "/malls/index.html";
	if (document.referrer.indexOf(mainURL) > -1) {
		if (getCookie("interparkSNO") == "") {
			setCookie("interparkSNO", fn_request("bl_id"));
		}
	}
}

/////////////////////////////////////////////////////////////////////////////////////////////////
/*************************************** onLoad ÇÔ¼ö ³¡ ***************************************/
/////////////////////////////////////////////////////////////////////////////////////////////////

/*ºí·¯¸µ*/

function bluring()
{
    try{
        if(event.srcElement.tagName=="A"||event.srcElement.tagName=="IMG")
        {
        	document.body.focus();
        }
	}catch(e){
	}

}

/* gate °ü·Ã ÇÔ¼ö ½ÃÀÛ */
function gate(next)
{

	sessionNo = getCookie("interparkSNO"); // ¼¼¼Ç°ª Ãëµæ
	
	// www.bookpark.comÀÏ °æ¿ì °æ·Î Àç¼³Á¤
	if (next.indexOf('www.bookpark.com') > 0) {
		next = 'http://book.interpark.com'+next.substring(next.indexOf('www.bookpark.com')+16);
	}
	
	// 17148_¼¼¼Çµ¿±âÈ­ Àû¿ë °ü·Ã ¼Ò½º ¼öÁ¤(2009.03.25)
	if (sessionNo.substring(0, 6) == 'P01423') { //»ï¼ºÄ«µå IPP
		if (next.indexOf('www.ticketpark.com') > 0 || next.indexOf('ticket.interpark.com') > 0 || next.indexOf('sports.interpark.com') > 0 || next.indexOf('movie.interpark.com') > 0 ) {
			alert('ÁË¼ÛÇÕ´Ï´Ù. Æ¼ÄÏ ¼­ºñ½º´Â Á¦°øÇÏÁö ¾Ê½À´Ï´Ù.');
			return;
		} else if(next.indexOf('condo.interpark.com') > 0 ||next.indexOf('tour.interpark.com') > 0 || next.indexOf('www.interparktravel.com') > 0 
				|| next.indexOf('travel.interpark.com') > 0 || next.indexOf('air.interpark.com') > 0 || next.indexOf('hotel.interpark.com') > 0 
				|| next.indexOf('eurail.interpark.com') > 0 || next.indexOf('tourpkg.interpark.com') > 0 || next.indexOf('motel.interpark.com') > 0){
			alert('ÁË¼ÛÇÕ´Ï´Ù. ¿©Çà ¼­ºñ½º´Â Á¦°øÇÏÁö ¾Ê½À´Ï´Ù.');
			return;
		} else if(next.indexOf('mart.interpark.com') > 0){
			alert('ÁË¼ÛÇÕ´Ï´Ù. ¸¶Æ® ¼­ºñ½º´Â Á¦°øÇÏÁö ¾Ê½À´Ï´Ù.');
			return;
		}
		
		
		
		location.href = next;
	} else { // »ï¼ºÄ«µå IPP°¡ ¾Æ´Ñ°æ¿ì
		location.href = next;
	}
	
}

function go_mm(num1,num2)
{
	if(num1 == 1)
	{
		location.href = ordHttpDomain + "/malls/index.html"; //¼îÇÎ
	}else if(num1 == 2){
		location.href = ordHttpDomain + "/bookPark/html/book.html?mbn=gnb&mln=book"; //µµ¼­
	}else if(num1 == 3){
		if(num2 == 1){
			gate('http://ticket.interpark.com/?mbn=gnb&mln=ticket'); //°ø¿¬
		}else{
			gate('http://movie.interpark.com/Movie/index.asp?mbn=gnb&mln=movie') //¿µÈ­
		}
	}else if(num1 == 4){
		gate('http://tour.interpark.com/category/index.asp?mbn=gnb&mln=tour') //¿©Çà/Ç×°ø±Ç
	}else{
		location.href = "http://beautiful.interpark.com/?mbn=gnb&mln=beautiful"; //¾Æ¸§´Ù¿î °¡°Ô
	}
}

function go_mm2(num1)
{
	if(num1 == "31")
	{
		gate('http://ticket.interpark.com/?mbn=gnb&mln=ticket'); //°ø¿¬
	}else if(num1 == "32"){
		gate('http://movie.interpark.com/Movie/index.asp?mbn=gnb&mln=movie') //¿µÈ­
	}else if(num1 == "41"){
		gate('http://tour.interpark.com/category/index.asp?mbn=gnb&mln=tour') //¿©Çà/Ç×°ø±Ç
	}else if(num1 == "51"){
		gate('http://mart.interpark.com/?mbn=gnb&mln=mart') //¸¶Æ®
	}else if(num1 == "61"){
		gate('http://talkbean.interpark.com/display.do?cmd=siteMain&mbn=gnb&mln=talkbean') //ÅäÅ©ºó
	}
}

/* gate °ü·Ã ÇÔ¼ö ³¡ */

/* ·Î±×ÀÎ °ü·Ã ÇÔ¼ö ½ÃÀÛ */
function getHeaderLogin() {

	var currentUrl = location.href;
	if(currentUrl.indexOf("highlow.interpark.com") > -1) {
		if (locationPort.length > 0){
			ordHttpDomain = "http://highlow.interpark.com:"+locationPort;
		} else {
			ordHttpDomain = "http://highlow.interpark.com";
		}
		var url = ordHttpDomain + "/member/login.do?_method=initial&imfsUserPath=http://highlow.interpark.com/highlow/EndWeekAuctionList.do?_method=thisWeek";
	} else {
		var url = ordHttpDomain + "/member/login.do?_method=initial&reqSite=SHOP";
	}

	var idx1 = currentUrl.indexOf("/",9);
	var idx2 = currentUrl.indexOf("?",idx1+1);
	if (idx2 == -1) idx2 = 9999;
	var str1 = currentUrl.substring(idx1,idx2);
	var str2 = currentUrl.substring(idx2+1);
	var idxLogOut = currentUrl.indexOf("logout");
	if (idxLogOut != -1) {
		str1 = "";
		str2 = "";
	}

	var login = currentUrl.indexOf("login");
	if (idxLogOut == -1 || login == -1) {
		url += "&historyGoCnt=-1";
	} else {
		url += "&historyGoCnt=-2";
	}

	window.open(url, "_self", "");
}
/* ·Î±×ÀÎ °ü·Ã ÇÔ¼ö ³¡ */

/////////////////////////////////////////////////////////////////////////////////////////////////
/***************************************** ÇÃ·¡½ÃÈ£Ãâ ******************************************/
/////////////////////////////////////////////////////////////////////////////////////////////////
 /**
     swf °´Ã¼ Ã£±â.

 */
function thisMovie(movieName)
{
	var isIE = navigator.appName.indexOf("Microsoft") != -1;
	return (isIE) ? window[movieName] : document[movieName];
}


 /**
	ria ³»ºÎ ÇÔ¼ö È£Ãâ ½ÃÅ°´Â ¿ªÇÒ.   ÆÄ¶ó¸ÞÅÍ·Î ¸í·É ±¸ºÐ.
	@ str  -  reset : Àå¹Ù±¸´Ï¿¡ »óÇ°ÀÌ Ãß°¡ µÇ¾úÀ»¶§ ria¸¦ ¸®¼Â½ÃÄÑÁÜ.
	open : Àå¹Ù±¸´Ï¸¦ È°¼ºÈ­½ÃÅ´.(¿ÀÇÂ½ÃÅ´)
	close : Àå¹Ù±¸´Ï¸¦ ºñÈ°¼ºÈ­ ½ÃÅ´ . (´Ý°Ô ÇÔ)
 */
function callRia(__str){
	var str = __str;
	thisMovie("shoppingBag").asFunc(str);
}

function swf_obj(src,w,h,swfid){
	swf_html = '';
	swf_html += '<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="'+w+'" height="'+h+'" id="'+swfid+'">';
	swf_html += '<param name="allowScriptAccess" value="always">';
	swf_html += '<param name="movie" value="'+src+'">';
	swf_html += '<param name="quality" value="high">';
	swf_html += '<param name="bgcolor" value="#FFFFFF">';
	swf_html += '<PARAM NAME="wmode" VALUE="transparent">';
	swf_html += '<embed src="'+src+'" quality="high" bgcolor="#FFFFFF" width="'+w+'" height="'+h+'" name="'+swfid+'" allowScriptAccess="always" wmode="transparent" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer">';
	swf_html += '</object>';
	document.write(swf_html);
}

// »õ·Î°íÄ§½Ã Flash9 ocx ¿¡·¯ ¹æÁö
window.onbeforeunload= function(){
	deconcept.SWFObjectUtil.prepUnload();
}


/*ExternalInterface °ü·Ã ÇÔ¼ö ½ÃÀÛ*/
function cleanup()
{
	__flash_unloadHandler = function()
	{
		externalProbSet = true;
		obj = document.getElementsByTagName('OBJECT');
		for (i=0;i<obj.length;i++)
		{
			var theObj = eval(obj[i]);
			theObj.style.display = "none";
			for (var prop in theObj)
			{
				if (typeof(theObj[prop]) == "function")
				{
					theObj[prop]=null
				}
			}
		}
	}

	if (window.onunload != __flash_unloadHandler)
	{
		__flash_savedUnloadHandler = window.onunload;
		window.onunload = __flash_unloadHandler;
	}
}
window.onbeforeunload=cleanup;
/*ExternalInterface °ü·Ã ÇÔ¼ö ³¡*/

/**********************************
**  NIP ºñ±³ÇÏ±â  ½ÃÀÛ  	 **
***********************************/

var COMPLIST_PRDNO = "compListPrdNo";

function multiinsertCompListNIP(key, reqSite){
	//ÀÌÀü ÄíÅ°°ª
	compListPrd = getCompCookieNIP(COMPLIST_PRDNO).split(",");

	//ÇöÀç °ª
	var delvKey 	= document.getElementsByName(key);
	var prdNoList = new Array;
	var j=0;
	var cnt = 0;
	for (var i=0; i < delvKey.length; i++)
	{
		var delvKeyItem = delvKey.item(i);
		if (delvKeyItem.checked)
		{
			prdNoList[j] = delvKeyItem.value.split(',')[0]; // modify by ¿äÇÑ. KEY°ªÀÌ [»óÇ°¹øÈ£, CNT] ·Î µÇÀÖ´Â°æ¿ìµµ ÀÖ±â¶§¹®¿¡
			j++;
			cnt++;
		}
	}

	if(j == 0){
		alert("¼±ÅÃÇÏ½Å »óÇ°ÀÌ ¾ø½À´Ï´Ù.\n»óÇ°À» ¼±ÅÃÇÏ½ÅÈÄ ¹öÆ°À» ´­·¯ÁÖ½Ê½Ã¿À.");
		return;
	}else{
		if(prdNoList.length > 4){
			alert("ÇÑ¹ø¿¡ ÃÖ´ë 4°³ÀÇ »óÇ°¸¸ ´ãÀ»¼ö ÀÖ½À´Ï´Ù.");
			return;
		}

		var prdNoListReal = new Array;
		var k=0;

		for(var r=0;r<prdNoList.length ; r++){
		prdNoListReal[r] =  prdNoList[r];
		k++;
		}
		if(cnt < 4){
		if(compListPrd != "" && compListPrd != null){

			for(var i = 0; i<compListPrd.length; i++)
			{
				IsData = false;
				idx = 0;
				for(var m = 0;m<prdNoList.length ;m++){

					if((prdNoList[m] == compListPrd[i]) || (compListPrd[i] =="0") ||(compListPrd[i] ==""))
					{
						IsData = true;
						//prdNoListReal[k] = compListPrd[i];
					}
				}
				if(IsData == false){
				prdNoListReal[k] = compListPrd[i];
				k++;
				}
				if(k>3){
				break;
				}
			}//forÀÌÀü °ª°ú ºñ±³ end
		}
		}

		var leng = compListPrd.length;
		var realleng = prdNoListReal.length;

		setCompCookieNIP(COMPLIST_PRDNO,prdNoListReal,1);	//ÄíÅ° »ý¼º

		window.open('/malls/CompList.do?_method=initialNIP&cnt='+cnt+"&reqSite=SHOP",'pop_productcompare','status=yes,menubar=0,resizable=0,scrollbar=no,width=340,height=220,left=50,top=50');
	}
}


function goCompListNIP() {

	window.open('/malls/CompList.do?_method=listNIP','pop_productcompare_nip','status=yes,menubar=0,resizable=yes,scrollbar=no,width=340,height=220,left=500,top=50');

}


function getCompCookieNIP(name){
	var nameOfCookie = name + "=";
	var x = 0;
	while ( x <= document.cookie.length )
	{
		var y = (x+nameOfCookie.length);
		if ( document.cookie.substring( x, y ) == nameOfCookie ) {
			if ( (endOfCookie=document.cookie.indexOf( ";", y )) == -1 )
				endOfCookie = document.cookie.length;
			return unescape( document.cookie.substring( y, endOfCookie ) );
		}
		x = document.cookie.indexOf( " ", x ) + 1;
		if ( x == 0 )
			break;
	}
	return "";
}
function setCompCookieNIP(name, value, expiredays) {
	var cookie = name + "=" + escape(value)
				+ "; domain=" + DEFAULT_COOKIE_DOMAIN;

	if (expiredays < 0) {
		var date = new Date();
		date.setSeconds(date.getSeconds() + expiredays);
		cookie += "; expires=" + date.toGMTString();
	}
	cookie += "; path="+DEFAULT_COOKIE_PATH+";";
	document.cookie = cookie;

}
/**********************************
**  NIP ºñ±³ÇÏ±â  ³¡  	 **
***********************************/

/**********************************
**  NIP »óÇ°½½¶óÀÌµå  	 **
***********************************/
function slideShow(key,shopNo,dispNo){
	var delvKey 	= document.getElementsByName(key);
	var prdNoList = new Array;
	if(delvKey.length < 1){
		return;
	}
	for (var i=0; i < delvKey.length; i++){
		var delvKeyItem = delvKey.item(i);
		prdNoList[i] = delvKeyItem.value.split(',')[0];
	}
	//700 * 516
	var url = "/malls/SlideShow.do?_method=Initial&sc.slidePrdNo="+prdNoList+"&sc.shopNo="+shopNo+"&sc.dispNo="+dispNo;
	window.open(url,'slide','status=yes,menubar=0,resizable=0,scrollbars=no,width=700,height=516,left=500,top=50');
}
/**********************************
**  NIP »óÇ°½½¶óÀÌµå  ³¡	 **
***********************************/


/***************************************************
*   NIP »óÇ° ¿À¹ö½Ã ¹Ì¸®º¸±â »õÃ¢ º¸±â ·¹ÀÌ¾î ½ÃÀÛ *
***************************************************/
function showTargetLayer(show, con_img){
	var obj_view = document.getElementsByName(con_img);

	if( obj_view[show-1].style.display == "none")
	{
		obj_view[show-1].style.display = "";

	}else{
		obj_view[show-1].style.display = "none";
	}
}
/*************************************************
*   NIP »óÇ° ¿À¹ö½Ã ¹Ì¸®º¸±â »õÃ¢ º¸±â ·¹ÀÌ¾î ³¡ *
*************************************************/

/***************************************************
*   NIP ¼ºÀÎ »óÇ° ÀÌ¹ÌÁö Ç¥½Ã *
***************************************************/
function writeAdultImg( orgImg, ordAgeRstrYn, ordRstrAge, imgSize, ordclass )
{
	var defaultImg = "http://openimage.interpark.com/malls/default.gif";
	if(ordclass == null || ordclass == '' || ordclass == undefined)
		ordclass = "border_list";
 
	if( ordAgeRstrYn != 'Y') {
		document.write( "<img src='" + orgImg + "' onError=\"javascript:this.src='" + defaultImg + "';\" width='" + imgSize + "' height='" + imgSize + "' border='0' class='" + ordclass + "'>");
		return;
	}

	if( ordRstrAge == null || ordRstrAge == "") ordRstrAge = "0";
	if( parseFloat( ordRstrAge) < 19) {
		document.write( "<img src='" + orgImg + "' onError=\"javascript:this.src='" + defaultImg + "';\" width='" + imgSize + "' height='" + imgSize + "' border='0' class='" + ordclass + "'>");
		return;
	}

	var alultImg = "http://openimage.interpark.com/img/imfs/malls/adult_19_130.gif";
	var memAge = getMemAge();
	
	if( memAge <= parseFloat( ordRstrAge)) {
		document.write( "<img src='" + alultImg + "' onError=\"javascript:this.src='" + defaultImg + "';\" width='" + imgSize + "' height='" + imgSize + "' border='0' class='" + ordclass + "'>");
		return;
	}
	else {
		document.write( "<img src='" + orgImg + "' onError=\"javascript:this.src='" + defaultImg + "';\" width='" + imgSize + "' height='" + imgSize + "' border='0' class='" + ordclass + "'>");
		return;
	}
}

function writeAdultImgAjax(obj, orgImg, ordAgeRstrYn, ordRstrAge, imgSize, ordclass )
{

	var defaultImg = "http://openimage.interpark.com/_nip_ui/openlist/noimage_"+imgSize+".gif";

	if(imgSize == null || imgSize ==""){
		defaultImg = "http://openimage.interpark.com/_nip_ui/openlist/noimage_130.gif";
	}
	

	if(ordclass == null || ordclass == '' || ordclass == undefined)
		ordclass = "border_list";
 
	if( ordAgeRstrYn != 'Y') {
		obj.innerHTML = "<img src='" + orgImg + "' onError=\"javascript:this.src='" + defaultImg + "';\" width='" + imgSize + "' height='" + imgSize + "' border='0' class='" + ordclass + "'>";
		return false;
	}

	if( ordRstrAge == null || ordRstrAge == "") ordRstrAge = "0";
	if( parseFloat( ordRstrAge) < 19) {
		obj.innerHTML = "<img src='" + orgImg + "' onError=\"javascript:this.src='" + defaultImg + "';\" width='" + imgSize + "' height='" + imgSize + "' border='0' class='" + ordclass + "'>";
		return;
	}

	var alultImg = "http://openimage.interpark.com/img/imfs/malls/adult_19_130.gif";
	var memAge = getMemAge();
	
	if( memAge <= parseFloat( ordRstrAge)) {
		obj.innerHTML = "<img src='" + alultImg + "' onError=\"javascript:this.src='" + defaultImg + "';\" width='" + imgSize + "' height='" + imgSize + "' border='0' class='" + ordclass + "'>";
		return;
	}
	else {
		obj.innerHTML = "<img src='" + orgImg + "' onError=\"javascript:this.src='" + defaultImg + "';\" width='" + imgSize + "' height='" + imgSize + "' border='0' class='" + ordclass + "'>";
		return;
	}
}


function writeAdultImgAjaxReturn(option, orgImg, ordAgeRstrYn, ordRstrAge, imgSize, ordclass )
{
	var defaultImg = "http://openimage.interpark.com/_nip_ui/openlist/noimage_"+imgSize+".gif";

	if(imgSize == null || imgSize ==""){
		defaultImg = "http://openimage.interpark.com/_nip_ui/openlist/noimage_130.gif";
	}
	

	if(ordclass == null || ordclass == '' || ordclass == undefined)
		ordclass = "border_list";
 
	if( ordAgeRstrYn != 'Y') {
		if(option=="JUST_URL"){return orgImg;}
		return "<img src='" + orgImg + "' onError=\"javascript:this.src='" + defaultImg + "';\" width='" + imgSize + "' height='" + imgSize + "' border='0' class='" + ordclass + "'>";

	}
	if( ordRstrAge == null || ordRstrAge == "") ordRstrAge = "0";
	if( parseFloat(ordRstrAge) < 19) {
		if(option=="JUST_URL"){return orgImg;}
		return "<img src='" + orgImg + "' onError=\"javascript:this.src='" + defaultImg + "';\" width='" + imgSize + "' height='" + imgSize + "' border='0' class='" + ordclass + "'>";
	}

	var alultImg = "http://openimage.interpark.com/img/imfs/malls/adult_19_130.gif";
	var memAge = getMemAge();
	
	if( memAge <= parseFloat( ordRstrAge)) {
		if(option=="JUST_URL"){return alultImg;}		
		return "<img src='" + alultImg + "' onError=\"javascript:this.src='" + defaultImg + "';\" width='" + imgSize + "' height='" + imgSize + "' border='0' class='" + ordclass + "'>";
	}
	else {
		if(option=="JUST_URL"){return orgImg;}		
		return "<img src='" + orgImg + "' onError=\"javascript:this.src='" + defaultImg + "';\" width='" + imgSize + "' height='" + imgSize + "' border='0' class='" + ordclass + "'>";
		
	}
	
	return;
}

function getMemAge(){
	var birth = getCookie( "M_BirthYear");
	var age = 0;

	if( birth == null || birth == "" || birth == "null" || birth== "nullnull" || birth.length < 2) {
		return age;
	}

	var birth = birth.substr( 0, 2);
	var today = new Date();
	var nowYear = today.getFullYear();
	var nowYear2 = nowYear + "";
	nowYear2 = nowYear2.substr( 2, 4);

	if( birth < nowYear2) birth = "20" + birth;
	else birth = "19" + birth;
	
	age = parseInt( nowYear) - parseInt( birth) + 1;

	return age;
}

/***************************************************
*   NIP ¼ºÀÎ »óÇ° ÀÌ¹ÌÁö Ç¥½Ã *
***************************************************/

/////////////////////////////////////////////////////////////////////////////////////////////////
/******************************************** µµ¿ò¸» *******************************************/
/////////////////////////////////////////////////////////////////////////////////////////////////

function disp_div(div_name,xmouse,ymouse)
{
	help_divwid = parseInt(document.getElementById(div_name).style.width,10);
	if(document.body.clientWidth > (help_divwid+xmouse+15))
	{
		document.getElementById(div_name).style.left = document.getElementById("wrapBody").scrollLeft + xmouse + 10;
		document.getElementById(div_name).style.top = document.getElementById("wrapBody").scrollTop + ymouse;
	}else{
		document.getElementById(div_name).style.left = (document.getElementById("wrapBody").scrollLeft + xmouse) - (help_divwid+10);
		document.getElementById(div_name).style.top = document.getElementById("wrapBody").scrollTop + ymouse;
	}
	document.getElementById(div_name).style.visibility = "visible";
}

function hide_div(div_name)
{
	document.getElementById(div_name).style.visibility = "hidden";
}


/**********************************
**  NIP »óÇ° ÀÌ¹ÌÁö È®´ëº¸±â ½ÃÀÛ **
***********************************/
function DetailImgNIP(prdNo){
		temp_url = "/product/ProductDetailImage.do?_method=detailNIP&sc.prdNo="+prdNo;
		var	newwindow =	window.open(temp_url, "", "width=382, height=430, left=0,right=0,status=yes,toolbar=no,menubar=no,location=no,scrollbars=no,resizable=no");
}
/**********************************
**  NIP »óÇ° ÀÌ¹ÌÁö È®´ëº¸±â ³¡ **
***********************************/



//¿À´Ãº» »óÇ°

var prdcookies;
var imgcookies;
var agecookies;

var TODAY_VIEW_PRDNO = "todayViewPrdNo";
var TODAY_VIEW_IMG = "todayViewImg";
var TODAY_VIEW_AGE = "todayViewAge";

var useNextPrev = 0;						//prev/next counting
var rvi_cnt = 0;								//³»°¡º» ¹°Ç° ÀüÃ¼ count
var rvi_list_cnt = 4;						//È­¸é¿¡ ³ëÃâµÇ´Â <td>ÀÇ °¹¼ö


// ¿À´Ã º» »óÇ° ÄíÅ°¼³Á¤ °ü·Ã ÇÔ¼ö ½ÃÀÛ *****************
function settodayview(prdNo,img,link,age) {
	if (age == undefined || age == ""){
		age = "0";
	}

	if (prdNo == "" || img == "" || link == "") return;
	prdcookies = getTodayViewCookie(TODAY_VIEW_PRDNO).split(",");
	imgcookies = getTodayViewCookie(TODAY_VIEW_IMG).split(",");
	agecookies = getTodayViewCookie(TODAY_VIEW_AGE).split(",");

	if (prdcookies != "" && prdcookies.length > 0) {

		if (agecookies == "" && prdcookies.length != agecookies.length){
			agecookies = "0";
			for (var i=0 ; i < prdcookies.length - 1 ; i++){
				agecookies += ",0";
			}
		}

		for (var i = 0; i<prdcookies.length; i++) {
			if (prdNo == prdcookies[i]) {
				return;
			}
		}
		
		prdcookies = prdcookies+","+prdNo;
		imgcookies = imgcookies+","+img;
		agecookies = agecookies+","+age;
	} else {
		prdcookies = prdNo;
		imgcookies = img;
		agecookies = age;
	}

	setTodayViewCookie(TODAY_VIEW_PRDNO,prdcookies,1);
	setTodayViewCookie(TODAY_VIEW_IMG,imgcookies,1);
	setTodayViewCookie(TODAY_VIEW_AGE,agecookies,1);
}

function setTodayViewCookie(name, value, expiredays) {

	var cookie = name + "=" + escape(value)
				+ "; domain=" + DEFAULT_COOKIE_DOMAIN;

	if (expiredays < 0) {
		var date = new Date();
		date.setSeconds(date.getSeconds() + expiredays);
		cookie += "; expires=" + date.toGMTString();
	}
	cookie += "; path="+DEFAULT_COOKIE_PATH+";";
	document.cookie = cookie;
}

function getTodayViewCookie(name) {
	var nameOfCookie = name + "=";
	var x = 0;
	while ( x <= document.cookie.length ) {
		var y = (x+nameOfCookie.length);
		if ( document.cookie.substring( x, y ) == nameOfCookie ) {
			if ( (endOfCookie=document.cookie.indexOf( ";", y )) == -1 ) {
				endOfCookie = document.cookie.length;
			}
			return unescape( document.cookie.substring( y, endOfCookie ) );
		}
		x = document.cookie.indexOf( " ", x ) + 1;
		if ( x == 0 ) {
			break;
		}
	}
	return "";
}
// ¿À´Ã º» »óÇ° ÄíÅ°¼³Á¤ °ü·Ã ÇÔ¼ö ³¡ *****************

var TODAY_VIEW_CATEGORY = "todayViewCategory";
// ¿À´Ã º» Ä«Å×°í¸® ÄíÅ°¼³Á¤ °ü·Ã ÇÔ¼ö ½ÃÀÛ *****************
function setTodayViewCateCookie(dispNo) {

	if (dispNo == ""){
		return;
	}

	dispNoCookies = getCookie(TODAY_VIEW_CATEGORY).split(",");

	if (dispNoCookies != "" && dispNoCookies.length > 0) {
		for (var i = 0; i < dispNoCookies.length; i++) {
			if (dispNo == dispNoCookies[i]) {
				return;
			}
		}

		if(dispNoCookies.length >= 20){
			var dispNoCookiesOver = "";
			for(var i = 1; i < 20; i++){
				if(i == 1){
					dispNoCookiesOver = dispNoCookies[i];
				}else{
					dispNoCookiesOver = dispNoCookiesOver + "," + dispNoCookies[i];
				}
			}
			dispNoCookies = dispNoCookiesOver + "," + dispNo;
		}else{
			dispNoCookies = dispNoCookies + "," + dispNo;
		}

	} else {
		dispNoCookies = dispNo;
	}

	_setCookie(TODAY_VIEW_CATEGORY, dispNoCookies, false);

}
// ¿À´Ã º» Ä«Å×°í¸® ÄíÅ°¼³Á¤ °ü·Ã ÇÔ¼ö ³¡ *****************

/////////////////////////////////////////////////////////////////////////////////////////////////
/*************************************** À¥ Ä¿¹Â´ÏÄÉÀÌ¼Ç Åø ½ÃÀÛ *******************************/
/////////////////////////////////////////////////////////////////////////////////////////////////

if (document.URL.indexOf("https") > -1){
	document.write("<script language='javascript' src='https://sso.interpark.com/gate/js/crm_box.js'></script>");
}else{
	document.write("<script language='javascript' src='http://sso.interpark.com/gate/js/crm_box.js'></script>");
}

/////////////////////////////////////////////////////////////////////////////////////////////////
/*************************************** À¥ Ä¿¹Â´ÏÄÉÀÌ¼Ç Åø ³¡ *********************************/
/////////////////////////////////////////////////////////////////////////////////////////////////



/////////////////////////////////////////////////////////////////////////////////////////////////
/************************* À£ÄÄ ¸ÞÀÎ Åä½ºÆ®º£³Ê ½ºÅ©¸³Æ® ½ÃÀÛ ***************************/
/////////////////////////////////////////////////////////////////////////////////////////////////

/////////////////////////////////////////////////////////////////////////////////////////////////
/************************* À£ÄÄ ¸ÞÀÎ Åä½ºÆ®º£³Ê ½ºÅ©¸³Æ® ³¡ ***************************/
/////////////////////////////////////////////////////////////////////////////////////////////////

function getCookie(name){
	var nameOfCookie = name + "=";
	var x = 0;
	while ( x <= document.cookie.length )
	{
		var y = (x+nameOfCookie.length);
		if ( document.cookie.substring( x, y ) == nameOfCookie ) {
			if ( (endOfCookie=document.cookie.indexOf( ";", y )) == -1 )
				endOfCookie = document.cookie.length;
			return unescape( document.cookie.substring( y, endOfCookie ) );
		}
		x = document.cookie.indexOf( " ", x ) + 1;
		if ( x == 0 )
			break;
	}
	return "";
}