
String.prototype.trim = function() 
	{
		return this.replace(/^\s+|\s+$/g,"");
	}

var click_Tmp;

function MM_nbGroup(event, grpName) { //v6.0
  var i,img,nbArr,args=MM_nbGroup.arguments;
  if (event == "init" && args.length > 2) {
    if ((img = MM_findObj(args[2])) != null && !img.MM_init) {
      img.MM_init = true; img.MM_up = args[3]; img.MM_dn = img.src;
      if ((nbArr = document[grpName]) == null) nbArr = document[grpName] = new Array();
      nbArr[nbArr.length] = img;
      for (i=4; i < args.length-1; i+=2) if ((img = MM_findObj(args[i])) != null) {
        if (!img.MM_up) img.MM_up = img.src;
        img.src = img.MM_dn = args[i+1];
        nbArr[nbArr.length] = img;
    } }
  } else if (event == "over") {
    document.MM_nbOver = nbArr = new Array();
    for (i=1; i < args.length-1; i+=3) if ((img = MM_findObj(args[i])) != null) {
      if (!img.MM_up) img.MM_up = img.src;
      img.src = (img.MM_dn && args[i+2]) ? args[i+2] : ((args[i+1])? args[i+1] : img.MM_up);
      nbArr[nbArr.length] = img;
    }
  } else if (event == "out" ) {
    for (i=0; i < document.MM_nbOver.length; i++) {
      img = document.MM_nbOver[i]; img.src = (img.MM_dn) ? img.MM_dn : img.MM_up; }
  } else if (event == "down") {
    nbArr = document[grpName];
    if (nbArr)
      for (i=0; i < nbArr.length; i++) { img=nbArr[i]; img.src = img.MM_up; img.MM_dn = 0; }
    document[grpName] = nbArr = new Array();
    for (i=2; i < args.length-1; i+=2) if ((img = MM_findObj(args[i])) != null) {
      if (!img.MM_up) img.MM_up = img.src;
      img.src = img.MM_dn = (args[i+1])? args[i+1] : img.MM_up;
      nbArr[nbArr.length] = img;
  } }
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function MM_showHideLayers() { //v3.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }
    obj.visibility=v; }
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function resize(){
	
	var io_ifrm = ifrm_re.document.body;
	var io_ifrm2 = document.all["ifrm_re"];
	io_ifrm2.style.height = io_ifrm.scrollHeight + (io_ifrm.offsetHeight - io_ifrm.clientHeight);
	video_main.height = io_ifrm.scrollHeight + (io_ifrm.offsetHeight - io_ifrm.clientHeight);
}

function monitor_Play(temp){
	if(temp == '1'){
		document.all["monitor_back"].style.display = "none";
		document.Monitor.Play();
	}
	else{
		document.all["monitor_back2"].style.display = "none";
		document.Monitor2.Play();
	}
}

function monitor_Stop(temp){
	if(temp == '1'){
		document.Monitor.Stop();
	}
	else{
		document.Monitor2.Stop();
	}
}

function con_Load(){
	parent.ifrm_re.location.href='contents_body.jsp?mode=board&mode2=charge';	
}

function com_Load(page){
	if(page == 'customer'){
		parent.ifrm_re.location.href='company/company_customer.jsp';	
	}
	else if(page == 'cooper'){
		parent.ifrm_re.location.href='company/company_cooper.jsp';	
	}
	else if(page == 'employ'){
		parent.ifrm_re.location.href='company/company_employ.jsp';	
	}
	else if(page == 'supply'){
		parent.ifrm_re.location.href='company/company_supply.jsp';	
	}
	else{
		parent.ifrm_re.location.href='company/company_thanks.jsp';
	}
}

function video_Load(page){
	if(page == 'server'){
		parent.ifrm_re.location.href='servSolution.jsp';	
	}
	else if(page == 'album'){
		parent.ifrm_re.location.href='mAlbum_char.jsp';
	}
	else if(page == 'video'){
		parent.ifrm_re.location.href='mVideo_char.jsp';
	}
	else if(page == 'develop'){
		parent.ifrm_re.location.href='custDevelop_char.jsp';
	}
	else{
		parent.ifrm_re.location.href='vSolution_info.jsp';
	}
}

function img_Load(page){
	if(page == 'mmphoto'){
		parent.ifrm_re.location.href='mPEditor_char.jsp';	
	}
	else if(page == 'woweditor'){
		parent.ifrm_re.location.href='wIEditor_char.jsp';
	}
	else if(page == 'uploader'){
		parent.ifrm_re.location.href='imgUploader_char.jsp';
	}
	else if(page == 'changer'){
		parent.ifrm_re.location.href='imgChanger.jsp';
	}
	else{
		parent.ifrm_re.location.href='iSolution_info.jsp';
	}
}

function pgm_Load(page){
	
	if(page == 'down'){
		parent.ifrm_re.location.href = "program_down.jsp";	
	}
	else if(page == 'con'){
		parent.ifrm_re.location.href = "contents_buy.jsp";
	}
	else if(page == 'reg'){
		parent.ifrm_re.location.href = "program_security.jsp";
	}
	else if(page == 'sol'){
		parent.ifrm_re.location.href = "program_solution.jsp";
	}else{
		parent.ifrm_re.location.href = 'program_buy.jsp';	
	}
}

function net_Load(page){
	if(page == 'develop'){
		parent.ifrm_re.location.href='custDevelop_char.jsp';
	}
	else{
		parent.ifrm_re.location.href='onPrint_char.jsp';
	}
}

function mem_Load(page, url){
	if(page == 'join'){
		parent.ifrm_re.location.replace("member_select.jsp");	
	}
	else if(page == 'modi'){
		parent.ifrm_re.location.replace("member_change.jsp");
	}
	else if(page == 'login'){
		parent.ifrm_re.location.href = "member_login.jsp?lurl="+url;
	}
	else if(page == 'err'){
		parent.ifrm_re.location.href = "member_relogin.jsp?lurl="+url;
	}
	else if(page == 'svc'){
		parent.ifrm_re.location.href = "member_service.jsp";
	}
	else if(page == 'ifind'){
		parent.ifrm_re.location.href = "member_check1.jsp?mode=find";
	}
	else if(page == 'bfind'){
		parent.ifrm_re.location.href = "business_check1.jsp?mode=find";
	}
	else{
		parent.ifrm_re.location.replace("member_service.jsp");
	}
}

function mem_info_Load(page){
	if(page == 'modi'){
		parent.ifrm_re.location.replace("member_change.jsp");
	}
	else if(page == 'login'){
		parent.ifrm_re.location.replace("member_login.jsp");
	}
	else{
		parent.ifrm_re.location.replace("member_change.jsp");
	}
}

function mediatrip_Load(page){
	if(page == 'charge'){
		parent.ifrm_re.location.replace("charge_step_01.jsp");
	}
	else if(page == 'sw'){
		parent.ifrm_re.location.replace("mediatrip/mtrip_sw.jsp");
	}
	else{
		parent.ifrm_re.location.replace("mediatrip/mtrip_info.jsp");
	}
}

function help_Load(page){
	if(page == 'notice'){
		parent.ifrm_re.location.replace("help_notice.jsp");	
	}
	else if(page == 'qna'){
		parent.ifrm_re.location.replace("help_qna.jsp");
	}
	else if(page == 'modi'){
		parent.ifrm_re.location.replace("member_change.jsp");
	}
	else if(page == 'imagesol'){
		parent.location.href = "imgSolution.jsp";
	}
	else if(page == 'videosol'){
		parent.location.href = "videoSolution.jsp";
	}
	else{
		parent.ifrm_re.location.replace("help_notice.jsp");
	}
}

function brosolution_Load(page){
	if(page == 'i15'){
		parent.ifrm_re.location.replace("broSolution_i15.jsp");	
	}
	else if(page == 'i16'){
		parent.ifrm_re.location.replace("broSolution_i16.jsp");
	}
	else{
		parent.ifrm_re.location.replace("broSolution_i2.jsp");
	}
}

function wizplay_Load(page){
	if(page == 'id'){
		parent.ifrm_re.location.replace("wizplay/wizplay_id.jsp");	
	}
	else if(page == 'reg'){
		parent.ifrm_re.location.replace("wizplay/wizplay_regkey.jsp");
	}
	else{
		parent.ifrm_re.location.replace("wizplay/wizplay_i1.jsp");
	}
}

function policy_Load(page){
	if(page == 'stip01'){
		parent.ifrm_re.location.replace("policy_stip_01.html");	
	}
	else if(page == 'stip02'){
		parent.ifrm_re.location.replace("policy_stip_02.html");
	}
	else if(page == 'stip03'){
		parent.ifrm_re.location.replace("policy_stip_03.html");
	}
	else if(page == 'stip04'){
		parent.ifrm_re.location.replace("policy_stip_04.html");
	}
	else{
		parent.ifrm_re.location.replace("policy_stip_01.html");
	}
}

function services_Load(page){
	if(page == 'mtrip'){
		parent.ifrm_re.location.replace("services/service_mtrip.jsp");	
		menu_click(0);
	}
	else if(page == 'wcon'){
		parent.ifrm_re.location.replace("services/service_wcon01.jsp");
		menu_click(3);
	}
	else if(page == 'wphone'){
		parent.ifrm_re.location.replace("services/service_wphone01.jsp");
		menu_click(5);
	}
	else if(page == 'wcaster'){
		parent.ifrm_re.location.replace("services/service_wcaster01.jsp");
		menu_click(1);
	}
	else if(page == 'wcaster2'){
		parent.ifrm_re.location.replace("services/service_wcaster02.jsp");
		menu_click(1);
	}
	else if(page == 'wchurch'){
		parent.ifrm_re.location.replace("services/service_wchurch01.jsp");
		menu_click(2);
	}
	else if(page == 'wchurch2'){
		parent.ifrm_re.location.replace("services/service_wchurch02.jsp");
		menu_click(2);
	}
	else if(page == 'wplay'){
		parent.ifrm_re.location.replace("services/service_wplay01.jsp");
		menu_click(4);
	}
	else if(page == 'wjudge'){
		parent.ifrm_re.location.replace("services/service_wplay01.jsp");
		menu_click(1);
	}
	else if(page == 'wguard'){
		parent.ifrm_re.location.replace("services/service_wguard01.jsp");
		menu_click(3);
	}
	else if(page == 'wguard2'){
		parent.ifrm_re.location.replace("services/service_wguard02.jsp");
		menu_click(3);
	}
	else if(page == 'wguardm'){
		parent.ifrm_re.location.replace("services/service_wguard03.jsp");
		menu_click(3);
	}
	else if(page == 'wgreg'){
		parent.ifrm_re.location.replace("services/wguard_regkey.jsp");
		menu_click(3);
	}
	else if(page == 'svcharge'){
		parent.ifrm_re.location.replace("services/service_charge.jsp");
	}
	else if(page == 'charge'){
		parent.ifrm_re.location.replace("charge_step_01.jsp");
	}
	else if(page == 'wgcharge'){
		menu_click(3);
		parent.ifrm_re.location.replace("services/charge_wizguard01.jsp");
	}
	else if(page == 'wid'){
		parent.ifrm_re.location.replace("services/wizplay_id.jsp");
		menu_click(2);
	}
	else if(page == 'wreg'){
		parent.ifrm_re.location.replace("services/wizplay_regkey.jsp");
		menu_click(2);
	}
	else{
		parent.ifrm_re.location.replace("services/service01.jsp");
	}
}

function solution_Load(page){
	
	if(page == 'wcon'){
		parent.ifrm_re.location.replace("/solution/solution_wcon.jsp");
	}
	else if(page == 'wphone'){
		parent.ifrm_re.location.replace("/solution/solution_wphone.jsp");
		menu_click(7);
	}
	else if(page == 'wchapel'){
		parent.ifrm_re.location.replace("/solution/solution_wchapel.jsp");
	}
	else if(page == 'wedu'){
		parent.ifrm_re.location.replace("/solution/solution_wedu.jsp");
	}
	else if(page == 'wmedi'){
		parent.ifrm_re.location.replace("/solution/solution_wmedi.jsp");
	}
	else if(page == 'wvrs'){
		parent.ifrm_re.location.replace("/solution/solution_wrs.jsp");
	}
	else if(page == 'wplay'){
		parent.ifrm_re.location.replace("solution/wizplay_i2.jsp");
	}
	else if(page == 'wjudge'){
		parent.ifrm_re.location.replace("solution/solution_wj.jsp");
	}
	else if(page == 'wiz'){
		parent.ifrm_re.location.replace("solution/solution_vc01.jsp");
		menu_click(7);
	}
	else if(page == 'v7'){
		parent.ifrm_re.location.replace("solution_v7.jsp");
		menu_click(4);
	}
	else if(page == 'v8'){
		parent.ifrm_re.location.replace("solution_v8.jsp");
		menu_click(4);
	}
	else if(page == 'v10'){
		parent.ifrm_re.location.replace("solution_v10.jsp");
		//menu_click(2);
	}
	else if(page == 'v5'){
		parent.ifrm_re.location.replace("solution_v5.jsp");
		menu_click(2);
	}
	else if(page == 'i1'){
		parent.ifrm_re.location.replace("solution_i1.jsp");
		menu_click(2);
	}
	else if(page == 'i2'){
		parent.ifrm_re.location.replace("solution_i2.jsp");
		menu_click(2);
	}
	else if(page == 'i3'){
		parent.ifrm_re.location.replace("solution_i3.jsp");
		menu_click(3);
	}
	else if(page == 'i4'){
		parent.ifrm_re.location.replace("solution_i4.jsp");
		menu_click(2);
	}
	else if(page == 'i5'){
		parent.ifrm_re.location.replace("solution_i5.jsp");
		menu_click(2);
	}
	else if(page == 'i6'){
		parent.ifrm_re.location.replace("solution_i6.jsp");
		menu_click(2);
	}
	else if(page == 'i7'){
		parent.ifrm_re.location.replace("solution_i7.jsp");
		menu_click(2);
	}
	else if(page == 'i8'){
		parent.ifrm_re.location.replace("solution_i8.jsp");
		menu_click(2);
	}
	else if(page == 'i9'){
		parent.ifrm_re.location.replace("solution_i9.jsp");
		menu_click(2);
	}
	else if(page == 'i10'){
		parent.ifrm_re.location.replace("solution_i10.jsp");
		menu_click(2);
	}
	else if(page == 'i13'){
		parent.ifrm_re.location.replace("solution_i13.jsp");
		menu_click(2);
	}
	else if(page == 'pc'){
		parent.ifrm_re.location.replace("/solution/solution_pc.jsp");
		menu_click(2);
	}
	else if(page == 'pb'){
		parent.ifrm_re.location.replace("/solution/solution_pb.jsp");
		menu_click(3);
	}
	else if(page == 'a1'){
		parent.ifrm_re.location.replace("solution_a1.jsp");
		menu_click(5);
	}
	else if(page == 'c1'){
		parent.ifrm_re.location.replace("solution_c1.jsp");
	}
	else if(page == 'n1'){
		parent.ifrm_re.location.replace("solution_n1.jsp");
		menu_click(5);
	}
	else if(page == 'm2'){
		parent.ifrm_re.location.replace("solution_m2.jsp");
		menu_click(1);
	}
	else if(page == 'm3'){
		parent.ifrm_re.location.replace("solution_m3.jsp");
		menu_click(1);
	}
	else if(page == 'm4'){
		parent.ifrm_re.location.replace("solution_m4.jsp");
		menu_click(1);
	}
	else if(page == 'multi'){
		parent.ifrm_re.location.replace("multidb_info.jsp");
		menu_click(1);
	}
	else if(page == 'b1'){
		parent.ifrm_re.location.replace("broSolution_i2.jsp");
		menu_click(6);
	}
	else if(page == 'b2'){
		parent.ifrm_re.location.replace("broSolution_i15.jsp");
		menu_click(6);
	}
	else if(page == 'b3'){
		parent.ifrm_re.location.replace("broSolution_i16.jsp");
		menu_click(6);
	}
	else{
		parent.ifrm_re.location.replace("solution/solution_m01.jsp");
	}
}

function album_Load(page){
	if(page == 'digital'){
		parent.ifrm_re.location.replace("/album/album_digital.jsp");	
		menu_click(0);
	}
	else if(page == 'print'){
		parent.ifrm_re.location.replace("/album/album_print.jsp");	
		menu_click(1);
	}
	else if(page == 'pb'){
		parent.ifrm_re.location.replace("/album/album_photobook01.jsp");	
		menu_click(0);
	}
	else if(page == 'pc'){
		parent.ifrm_re.location.replace("/album/album_photocal01.jsp");	
		menu_click(0);
	}
	else if(page == 'py'){
		parent.ifrm_re.location.replace("/album/album_pyearbook01.jsp");	
		menu_click(0);
	}
	else{
		parent.ifrm_re.location.replace("/album/album_intro.jsp");
	}
}


function RefreshStaticMenu() 
{ 
	var stmnStartPoint, stmnEndPoint, stmnRefreshTimer; 
	
	stmnStartPoint = parseInt(STATICMENU.style.top, 10); 
	
	
	stmnEndPoint = parent.document.body.scrollTop + stmnGAP2; 
	
	stmnLimit = parseInt(window.document.body.scrollHeight) - parseInt(STATICMENU.offsetHeight); 
	if (stmnEndPoint > stmnLimit) stmnEndPoint = stmnLimit; 
	
	if (stmnEndPoint < stmnGAP1) stmnEndPoint = stmnGAP1; 
	
	stmnRefreshTimer = stmnActivateSpeed; 
	
	if ( stmnStartPoint != stmnEndPoint ) { 
		stmnScrollAmount = Math.ceil( Math.abs( stmnEndPoint - stmnStartPoint ) / 15 ); 
		STATICMENU.style.top = parseInt(STATICMENU.style.top, 10) + ( ( stmnEndPoint<stmnStartPoint ) ? -stmnScrollAmount : stmnScrollAmount ); 
		stmnRefreshTimer = stmnScrollSpeed; 
	} 
	
	stmnTimer = setTimeout ("RefreshStaticMenu();", stmnRefreshTimer); 
} 

function InitializeStaticMenu() { 
	
	resize();
	
	var c_height = document.all["ifrm_re"].clientHeight;
	var o_height = document.body.offsetHeight;
	var s_height = document.body.scrollHeight;
	
	//alert(c_height);
	//alert(o_height);
	//alert(s_height);
	
	if(o_height < s_height){
		STATICMENU.style.display = 'block'; 
		STATICMENU.style.left = stmnLEFT; 
		STATICMENU.style.top = document.body.scrollTop + stmnBASE; 
		RefreshStaticMenu();
	}else{
	 	STATICMENU.style.display = 'none'; 
	}
} 
