function goHome() {
	document.location.href = "/ddungMain.do?lang=" + top.topframe.document.frmHidden.lang.value;
}

function goDdung() {
	document.location.href = "/family.do?lang=" + top.topframe.document.frmHidden.lang.value;
}

function goNews() {
	document.location.href = "/ddung/hotnewsLst.do?lang=" + top.topframe.document.frmHidden.lang.value;
}

function goPlay() {
	document.location.href = "/ddung/play.do?lang=" + top.topframe.document.frmHidden.lang.value;
}

function goProduct() {
	document.location.href = "/ddung/productLst.do?lang=" + top.topframe.document.frmHidden.lang.value;
}

function goLink() {
	document.location.href = "/ddung/link.do?lang=" + top.topframe.document.frmHidden.lang.value;
}

function goContact() {
	document.location.href = "/ddung/jsp/contact/contact.jsp?lang=" + top.topframe.document.frmHidden.lang.value;
}

function goPresent() {
	document.location.href	= "/ddung/play.do?cat_seq=6&lang=" + top.topframe.document.frmHidden.lang.value;
}

function goWe() {
	document.location.href	= "/ddung/StoryList.do?lang=" + top.topframe.document.frmHidden.lang.value;
}

function goFan() {
	document.location.href	= "/ddung/FanList.do?lang=" + top.topframe.document.frmHidden.lang.value;
}

function goShop() {
	document.location.href	= "http://www.ddungshop.com";
}

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 "";
}

function setCookie(name, value, expiredays) {
	var todayDate = new Date();
	todayDate.setDate(todayDate.getDate() + expiredays);
	
	document.cookie = name + "=" + escape(value) + "; path=/; expires=" + todayDate.toGMTString() + ";"
}

function showPopup(n, url, w, h) {
	var popup = window.open(url,'popup'+n,'width='+w+',height='+h);
	
	popup.focus();
}

function showCounsel() {
	var counsel = window.open('/counsel.do?cmd=write','counsel','width=660,height=455,scroll=no');
	
	counsel.focus();
}


