﻿function viewLanguage(type)
{
	if (type=='view')
	{
		document.getElementById("laguangeBox").style.display = "block";
	}
	else if (type=='hide')
	{
		document.getElementById("laguangeBox").style.display = "none";
	}
}

function LanguageSelect(type)
{
	if (type=='korean')
	{
		if (pageName==0)
		{
			window.location = "http://rainism.com/korean/main.html";
		}
		else if (pageName==1)
		{
			window.location = "http://rainism.com/korean/legend.html";
		}
		else if (pageName==2)
		{
			window.location = "http://rainism.com/korean/artist_rain.html";
		}
		else if (pageName==3)
		{
			window.location = "http://rainism.com/korean/notice.html";
		}
		else if (pageName==4)
		{
			window.location = "http://rainism.com/korean/news.html";
		}
		else if (pageName==5)
		{
			window.location = "http://rainism.com/korean/goods.html";
		}
		else if (pageName==6)
		{
			window.location = "http://rainism.com/korean/goods.html";
		}
	}
	if (type=='english')
	{
		if (pageName==0)
		{
			window.location = "http://rainism.com/english/main.html";
		}
		else if (pageName==1)
		{
			window.location = "http://rainism.com/english/legend.html";
		}
		else if (pageName==2)
		{
			window.location = "http://rainism.com/english/artist_rain.html";
		}
		else if (pageName==3)
		{
			window.location = "http://rainism.com/english/notice.html";
		}
		else if (pageName==4)
		{
			window.location = "http://rainism.com/english/news.html";
		}
		else if (pageName==5)
		{
			window.location = "http://rainism.com/english/goods.html";
		}
		else if (pageName==6)
		{
			window.location = "http://rainism.com/english/goods.html";
		}
	}
}

function Mplay(src, w, h)
{
	document.write('<embed src="'+src+'" width='+w+' height='+h+' autostart="1" showtracker="false" ShowPositionControls="true" EnableContextMenu="false">');
}

function openCamp()
{
	window.open('pop_camp.html','camp', 'width=500, height=617,left=0,top=0,toolbar=no, location=no, directories=no, status=no, menubar=no, resizable=no, scrollbars=no, copyhistory=no');
}

function goodsLink(type, idx)
{
	if (type=='outdoor')
	{
		window.location = "detail/detail_"+idx+".html";
	}
	else if (type=='online')
	{
		window.open(idx);
	}
	else
	{
		document.getElementById("goodsDetail").style.display = "none";
		document.getElementById("goodsList").style.display = "block";
	}
}

function viewArtpop(type, idx)
{
	var itemTop = document.documentElement.scrollTop + "px";
	var item = document.getElementById("artLayer");
	item.style.display = "block";
	item.style.top = itemTop;
	if (type=='album')
	{
		item.style.width = "474px";
		item.style.marginLeft = "-237px";
		item.innerHTML = "<img src='../images/artist/layerimg/album_"+idx+".jpg' alt='' /><div class='AlbumlayerBottom'><a href='javascript:closePop();'>[close]</a></div>";
	}
	else if (type=='concert')
	{
		item.style.width = "500px";
		item.style.marginLeft = "-250px";
		item.innerHTML = "<img src='../images/artist/layerimg/concert_"+idx+".jpg' alt='' /><div class='layerBottom'><a href='javascript:closePop();'>[close]</a></div>";
	}
	else if (type=='drama')
	{
		item.style.width = "502px";
		item.style.marginLeft = "-251px";
		item.innerHTML = "<img src='../images/artist/layerimg/drama_"+idx+".jpg' alt='' /><div class='layerBottom'><a href='javascript:closePop();'>[close]</a></div>";
	}
	else if (type=='movie')
	{
		item.style.width = "500px";
		item.style.marginLeft = "-250px";
		item.innerHTML = "<img src='../images/artist/layerimg/movie_"+idx+".jpg' alt='' /><div class='layerBottom'><a href='javascript:closePop();'>[close]</a></div>";
	}
}

function closePop()
{
	document.getElementById("artLayer").style.display = "none"
	document.getElementById("artLayer").innerHTML = "";
}

function imgGallery(page,idx)
{
	document.getElementById("show").innerHTML = "<img src='../images/gallery/show/page_"+page+"/img_"+idx+".jpg' alt='' />";
}

function viewNotice(idx)
{
	window.location = "notice/view_"+idx+".html";
}


function galleryPaging(type)
{
	if (type=='prev')
	{
		document.getElementById("list_1").style.display = "block"
		document.getElementById("list_2").style.display = "none"
	}
	else if(type=='next')
	{
		document.getElementById("list_1").style.display = "none"
		document.getElementById("list_2").style.display = "block"
	}
}