﻿// JavaScript Document


document.title="HONEYLANG";

$(document).ready(function() {

	$('#header').html(
		"<div class=\"section\">"
		+ "<div class=\"contents\">"
		+ "<h1>songseungheon.com</h1>"
		+ "<h2>honeylang</h2>"

/*
		+ "<div class=\"task\">"
		+ "<ul class=\"c\">"
		+ "<li class=\"first\"><a href=\"/html/06/01.html\"><img src=\"/_image/00/task_01.gif\" alt=\"LOGIN\" /></a></li>"
		+ "<li><a href=\"/html/06/02.html\"><img src=\"/_image/00/task_02.gif\" alt=\"HOME\" /></a></li>"
		+ "<li><a href=\"#\"><img src=\"/_image/00/task_03.gif\" alt=\"HELPDESK\" /></a></li>"
		+ "<li><a href=\"/html/nav.html\"><img src=\"/_image/00/task_04.gif\" alt=\"SITEMAP\" /></a></li>"
		+ "</ul>"
		+ "</div>"
*/

		+ "<div id=\"gnb\" class=\"nav\">"
		+ "<object id=\"flash_gnb\" name=\"flash_gnb\" width=\"1000\" height=\"257\" classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,115,0\">"
		+ "<!--[if !IE]><!-->"
		+ "<object type=\"application/x-shockwave-flash\" data=\"/_flash/navi.swf?xmlURL=/_flash/xml/full_navi.xml&timeCheck="+getCookie("s_time")+"&loginCheck="+getCookie("login")+"&depth1="+depth1+"&depth2="+depth2+"\" width=\"1000\" height=\"257\">"
		+ "<!--<![endif]-->"
		+ "<param name=\"movie\" value=\"/_flash/navi.swf?xmlURL=/_flash/xml/full_navi.xml&timeCheck="+getCookie("s_time")+"&loginCheck="+getCookie("login")+"&depth1="+depth1+"&depth2="+depth2+"\" />"
		+ "<param name=\"quality\" value=\"high\" />"
		+ "<param name=\"bgcolor\" value=\"#FFFFFF\" />"
		+ "<param name=\"wmode\" value=\"transparent\" />"
		+ "<param name=\"allowScriptAccess\" value=\"true\" />"
		+ "<param name=\"allowFullScreen\" value=\"true\" />"
//		+ "<param name=\"FlashVars\" value=\"?xmlURL=/_flash/xml/full_navi.xml&timeCheck=3&loginCheck=0&depth1=2&depth2=2\" />"
		+ "<!--[if !IE]><!-->"
		+ "</object>"
		+ "<!--<![endif]-->"
		+ "</object>"
		+ "</div>"

		+ "</div>"
		+ "</div>"
	);

	var footer_links = new Array(8);
	footer_links[1] = '/html/07/02.html';
	footer_links[2] = '/html/07/01.html';
	footer_links[3] = 'http://www.songseungheon.cc/';
	footer_links[4] = '/html/06/04.html';
	footer_links[5] = '/html/06/05.html';
	footer_links[7] = '/html/06/06.html';

	$('#footer').html(
			" <div class=\"links\">"
			+ "<div class=\"section\">"
			+ "<div class=\"fl\">"
			+ "<ul class=\"links-10 c\">"
			+ "<li><a href=\"" + footer_links[1] + "\"><img src=\"/_image/00/footer_link_01.gif\" alt=\"\"></a></li>"
			+ "<li><a href=\"" + footer_links[2] + "\"><img src=\"/_image/00/footer_link_02.gif\" alt=\"\"></a></li>"
			+ "<li><a href=\"" + footer_links[3] + "\"><img src=\"/_image/00/footer_link_03.gif\" alt=\"\"></a></li>"
			+ "</ul>"
			+ "</div>"
			+ "<div class=\"fr\">"
			+ "<ul class=\"links-20 c\">"
			+ "<li><a href=\"" + footer_links[4] + "\"><img src=\"/_image/00/footer_link_04.gif\" alt=\"\"></a></li>"
			+ "<li><a href=\"" + footer_links[5] + "\"><img src=\"/_image/00/footer_link_05.gif\" alt=\"\"></a></li>"
			+ "<li><a href=\"javascript:;\" onclick=\"SetPopup('popup_refusal','/html/07/refusal.html','396','192','no');\"><img src=\"/_image/00/footer_link_06.gif\" alt=\"\"></a></li>"
			+ "<li><a href=\"" + footer_links[7] + "\"><img src=\"/_image/00/footer_link_07.gif\" alt=\"\"></a></li>"
			+ "</ul>"
			+ "</div>"
			+ "</div>"
			+ "</div>"
		+ "<div class=\"section\">"
		+ "<div class=\"contents\">"
		+ "<div class=\"copyright\"><img src=\"/_image/00/footer_copyright.gif\" alt=\"COPYRIGHT\" /></div>"
		+ "</div>"
		+ "</div>"
	);

	$('#body .contents').append('<div class=\"j-contents-left\"></div>');
	$('#body .contents').append('<div class=\"j-contents-right\"></div>');
	$('#body .contents').append('<div class=\"visual\"></div>');
	
	$('table.biography tbody tr:odd th').css('background','#F7F7F7');
	$('table.biography tbody tr:odd td').css('background','#F7F7F7');

	subtabs = $('ul.film').find('li.film');
	subtabP = $('ul.film').find('.subtab');
	subtabA = $('ul.film').find('.subtab a');
	$('ul.film .film .subtab a').click(function() {
		subtabs.removeClass('current');
		subtabP.removeClass('current');
		subtabs.eq(subtabA.index(this)).addClass('current');
		subtabP.eq(subtabA.index(this)).addClass('current');
	});


	if ($.browser.msie && $.browser.version.substr(0,1)<7) { 
	}

	if ($.browser.msie) {
	}

	if ($.browser.mozilla) {
		$('.ellipsis').ellipsis();
	}

});





//flashObject(ID및NAME,플래시파일경로,가로픽셀,세로픽셀,변수,배경색,윈도우모드)

function flashString(mUrl, mWidth, mHeight, mID, mParams, mBGcolor, mWmode) {
	var buff = [];
	buff.push("<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0' width='" + mWidth + "' height='" + mHeight + "' id='" + mID + "' align='middle'>");
	buff.push("<param name='allowScriptAccess' value='always' />");
	buff.push("<param name='allowFullScreen' value='true' />");
	buff.push("<param name='movie' value='" + mUrl + "' />");
	buff.push("<param name='FlashVars' value='" + mParams + "' />");
	buff.push("<param name='quality' value='high' />");
	buff.push("<param name='wmode' value='" + mWmode + "' />");
	buff.push("<param name='bgcolor' value='" + mBGcolor + "' />");
	buff.push("<embed src='" + mUrl + "' FlashVars='" + mParams + "' quality='high' wmode='" + mWmode + "' bgcolor='" + mBGcolor + "' width='" + mWidth + "' height='" + mHeight + "' name='" + mID + "' align='middle' allowScriptAccess='always' allowFullScreen='false' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' />");
	buff.push("</object>");
	
	return buff.join("");
}

function flashObject(mUrl, mWidth, mHeight, mID, mParam, mBGcolor, mWmode) {
	document.write(flashString(mUrl, mWidth, mHeight, mID, mParam, mBGcolor, mWmode));
}


// 쿠키 체크 추가
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 reSize(name)
	{
			 try {       
						var oBody = document.frames(name).document.body; 
						var oFrame = document.all(name); 
													 
						oFrame.style.height = oBody.scrollHeight + (oBody.offsetHeight-oBody.clientHeight); 
						//oFrame.style.height = oBody.scrollHeight + 20; 

						if (oFrame.style.height == "0px" || oFrame.style.width == "0px") 
						{ 
							oFrame.style.height = "200px"; 
						} 
			 } catch(e) { 
				 //window.status = 'Error: ' + e.number + '; ' + e.description; 
			 } 

	}


//허니비타민 팝업
function Honey(){
	noticeWindow2 = window.open('/service/service.html','notice2','left=0, top=0, width=800,height=600, scrollbars=no');
    noticeWindow2.opener = self;
}

function SetPopup(name, url, width, height, scrollbars) {
    var name = "popup_"
	var screenWidth = screen.availWidth;
    var screenHeight = screen.availHeight;
    var left = (screenWidth - width) / 2;
    var top = (screenHeight - height) / 2;
    var width = width;
    var height = height;
    var directories = "no";
    var location = "no";
    var menubar = "no";
    var scrollbars = scrollbars;
    var status = "no";
    var resizable = "no";
    var toolbar = "no";

	var features =
        "modal"
        + ",left=" + left
        + ",top=" + top
        + ",width=" + width
        + ",height=" + height
        + ",directories=" + directories
        + ",location=" + location
        + ",menubar=" + menubar
        + ",scrollbars=" + scrollbars
        + ",status=" + status
        + ",resizable=" + resizable
		;
    try {
        window.open(url, name, features);
    } catch (e) {
    }
}

