
///////////// ¸Þ´º ///////////////////////////////////////////////////////////////////////////////////////////

function Mail(){location.href="mailto:chobi@maincanada.com";}
function Movie(){
window.open('/html/page/isp_movie.php', 'newwin', 'toolbar=0, location=0, status=0, menubar=0, scrollbars=0, resizable=0, top=300, left=300, width=417, height=280')}
//¼Ò°³
function main_menu1(){location.href="/html/page/sub11_introduce.php";}

function sub_menu11(){location.href="/html/page/sub11_introduce.php";}
function sub_menu12(){location.href="/html/page/sub12_hi.php";}
function sub_menu13(){location.href="/html/page/sub13_map.php";}


//ÀÔÇÐ¾È³»
function main_menu2(){location.href="/html/page/sub21_info.php";}

function sub_menu21(){location.href="/html/page/sub21_info.php";}
function sub_menu22(){location.href="/html/page/sub22_step.php";}
function sub_menu23(){location.href="/html/page/sub23_depart.php";}

//Á¤±Ô°úÁ¤
function main_menu3(){location.href="/html/page/sub31_invi.php";}
function sub_menu31(){location.href="/html/page/sub31_invi.php";}
function sub_menu32(){location.href="/html/page/sub32_feature.php";}
function sub_menu33(){location.href="/html/page/sub33_vacation.php";}
function sub_menu34(){location.href="/html/page/sub34_ex.php";}


//º¸µù½ºÄð

function main_menu4(){location.href="/html/page/sub41_why.php";}

function sub_menu41(){location.href="/html/page/sub41_why.php";}
function sub_menu42(){location.href="/html/page/sub42_service.php";}
function sub_menu43(){location.href="/html/page/sub43_top30.php";}
function sub_menu44(){location.href="/html/page/sub44_region.php";}


//ÇÐ»ý°ü¸®
function main_menu5(){location.href="/html/page/sub51_class.php";}

function sub_menu51(){location.href="http://www.maincanada.com/bbs/zboard.php?id=sub51_class";}
function sub_menu52(){location.href="http://www.maincanada.com/bbs/zboard.php?id=sub52_life";}
function sub_menu53(){location.href="http://www.maincanada.com/bbs/zboard.php?id=sub53_school";}
function sub_menu54(){location.href="http://www.maincanada.com/bbs/zboard.php?id=sub54_money";}

//Ä¿¹Â´ÏÆ¼
function main_menu6(){location.href="/html/page/sub61_comm.php";}

function sub_menu61(){location.href="http://www.maincanada.com/bbs/zboard.php?id=sub61_notice";}
function sub_menu62(){location.href="http://www.maincanada.com/bbs/zboard.php?id=sub62_report";}
function sub_menu63(){location.href="http://www.maincanada.com/bbs/zboard.php?id=sub63_letter";}
function sub_menu64(){location.href="http://www.maincanada.com/bbs/zboard.php?id=sub64_photo";}
function sub_menu65(){location.href="http://www.maincanada.com/bbs/zboard.php?id=sub65_qna";}
function sub_menu66(){location.href="http://www.maincanada.com/bbs/zboard.php?id=sub66_parents";}
function sub_menu67(){location.href="http://www.maincanada.com/bbs/zboard.php?id=sub67_faq";}







///////////// ÆË¾÷Ã¢ ///////////////////////////////////////////////////////////////////////////////////////////
function op01(){
window.open('http://www.justgo365.com/pswnService/frmMonth.aspx?pPscd=PS04477002&pSize=550&pMbcd=MBPS044770020002&pCpid=customer&pRev=1','01','left=0 top=0, width=600,height=635,toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=no');
}
function op02(){
window.open('http://www.jwpension.com/Reservation/CpensionCalendar.asp?num=361','01','left=0 top=0, width=650,height=635,toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=no');
}
function op03(){
window.open("http://www.interlakenpension.com/images/photo.html","02",'left=50 top=50, width=866,height=600,toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no');
}


///////////// ÇÃ·¡½Ã µ¿¿µ»ó ///////////////////////////////////////////////////////////////////////////////////////////
function showtravel(_file_)
{
	var _object_ = "";
	_object_ += '<object id="MediaPlayer" classid="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701" standby="Loading Microsoft Windows Media Player components..." type="application/x-oleobject" width="250" height="240">';
	_object_ += '<param name="AnimationatStart" value="false">';
	_object_ += '<param name="EnableTracker" value="true">';
	_object_ += '<param name="AutoStart" value="true">';
	_object_ += '<param name="AutoSize" value="false">';
	_object_ += '<param name="ShowControls" value="true">';
	_object_ += '<param name="ShowStatusBar" value="false">';
	_object_ += '<param name="Volume" value="-600">';
	_object_ += '<param name="FileName" value="'+ _file_ +'">';
	_object_ += '<embed width="250" height="240" src="'+ _file_ +'" enabletracker="true" showtracker="true" canseek="true" canseektomarkers="true" enablepositioncontrols="true" displaysize="0" showcontrols="true" showdisplay="0" showstatusbar="true" allowscan="true" canscan="true" autosize="0" cursortype="0" currentmarker="0" displaymode="0" enablecontextmenu="0" showcaptioning="0" >';
	_object_ += '</embed>';
	_object_ += '</object>';

	document.write(_object_);
}


// flash.js

 function showflash(str, wid, hei) {
 document.write("<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0' width='"+wid+"' height='"+hei+"'>")
 document.write("<param name='movie' value='"+str+"'>")
 document.write("<param name='wmode' value='transparent'>")
 document.write("<param name='allowScriptAccess' value='always'>")
 document.write("<embed src='"+str+"' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' width='"+wid+"' height='"+hei+"' allowScriptAccess='always'></embed></object>")
}

 function showflash2(str, wid, hei) {
 document.write("<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0' width='"+wid+"' height='"+hei+"'>")
 document.write("<param name='movie' value='"+str+"'>")
 document.write("<param name='quality' value='high'>")
 document.write("<param name='allowScriptAccess' value='always'>")
 document.write("<embed src='"+str+"' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' width='"+wid+"' height='"+hei+"' allowScriptAccess='always'></embed></object>")
}




// show hide layer
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 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_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_showHideLayers() { //v6.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; }
}

//////////////////Time///////////////////


function randTxt(v,u){								
	var txtListTmp = v;
	var urlListTmp = u;

	var txtList = txtListTmp.split(",");
	var urlList = urlListTmp.split(",");

	var num = Math.round(Math.random() * (txtList.length-1));								

	var txt = txtList[num];
	var url = urlList[num];	

	var result=new Array();
		result[0] = txt;
		result[1] = url;

	return result;							
}
function printTxt(v,u){
	var txtTmp = randTxt(v,u);
	var txt = txtTmp[0];
	var url = txtTmp[1];

	document.write("<a href=\"" + url + "\">" + txt + "</a>");
}

var now = new Date()
var hrs = now.getHours()
var min = now.getMinutes()
var user = -(now.getTimezoneOffset() / 60)

var day = new Date();
var currentTimeZoneOffsetInHours = - day.getTimezoneOffset()/60;

var ClockId = null;
var ClockRunning = false;

function TOfunc(v) {
var timezone = v;

var today = new Date();
var hours = today.getHours();
var minutes = today.getMinutes();
var secs = today.getSeconds();
hours += parseInt(timezone) - currentTimeZoneOffsetInHours;
today.setHours(hours);
ST = today.toString();
ST = ST.substring(4,10) + ". " + ST.substring(28,34) + ". " + ST.substring(10,19)

if(v == '-8'){
	timeArea.innerHTML = ST;
}else{
	timeArea2.innerHTML = ST;
}

ClockId = window.setTimeout( "TOfunc("+v+")", 1000 );
ClockRunning = true;
}

function stopClock(){
if(ClockRunning) clearTimeOut(ClockId); ClockRunning = false;
}

function citytime(v){
stopClock;
TOfunc(v);
}

var timerID ;
function tzone(tz, os, ds, cl)
{
	this.ct = new Date(0) ;
	this.tz = tz ;
	this.os = os ;
	this.ds = ds ;
	this.cl = cl ;
}

function UpdateClocks()
{
	var ct = new Array(
//		new tzone('', -8, 1, 'blue'),
		new tzone('', -8, 0, 'white'),		// Ä³³ª´Ù½Ã°£
		new tzone('', +9, 0, 'white')) ;	// ÇÑ±¹½Ã°£
	var dt = new Date() ;
	var startDST = new Date(dt.getFullYear(), 3, 1) ;
	while (startDST.getDay() != 0)
		startDST.setDate(startDST.getDate() + 1) ;
	var endDST = new Date(dt.getFullYear(), 9, 31) ;
	while (endDST.getDay() != 0)
		endDST.setDate(endDST.getDate() - 1) ;
	var ds_active ;		
	if (startDST < dt && dt < endDST)
		ds_active = 1 ;
	else
		ds_active = 0 ;
	for(n=0 ; n<ct.length ; n++)
		if (ct[n].ds == 1 && ds_active == 1) ct[n].os++ ;
	gmdt = new Date() ;
	for (n=0 ; n<ct.length ; n++)
		ct[n].ct = new Date(gmdt.getTime() + ct[n].os * 3600 * 1000) ;
	document.all.Clock0.innerHTML =
		'<font color="' + ct[0].cl + '">' + ct[0].tz + ClockString(ct[0].ct) + '</font>' ;
	document.all.Clock1.innerHTML =
		'<font color="' + ct[1].cl + '">' + ct[1].tz + ClockString(ct[1].ct) + '</font>' ;
	timerID = window.setTimeout("UpdateClocks()", 1001) ;
}

function ClockString(dt)
{
	var stemp, ampm ;
	var dt_year = dt.getUTCFullYear() ;
	var dt_month = dt.getUTCMonth() + 1 ;
	var dt_day = dt.getUTCDate() ;
	var dt_hour = dt.getUTCHours() ;
	var dt_minute = dt.getUTCMinutes() ;
	var dt_second = dt.getUTCSeconds() ;

	dt_year = dt_year.toString() ;
	if (0 <= dt_hour && dt_hour < 12)
	{
		ampm = 'AM' ;
		if (dt_hour == 0) dt_hour = 12 ;		
	} else {
		ampm = 'PM' ;
		dt_hour = dt_hour - 12 ;
		if (dt_hour == 0) dt_hour = 12 ;		
	}

	if (dt_minute < 10)
		dt_minute = '0' + dt_minute ;
	if (dt_second < 10)
		dt_second = '0' + dt_second ;
	stemp = dt_month + '/' + dt_day ;
	stemp = stemp + ' ' + dt_hour + ":" + dt_minute +''+ampm ;

	//stemp = dt_year.substr(2,2) + '/' + dt_month + '/' + dt_day ;
	//stemp = stemp + ' ' + dt_hour + ":" + dt_minute +' '+ ampm ;
	return stemp ;
}
function startTime(){
var time= new Date();
hours= time.getHours();
mins= time.getMinutes();
secs= time.getSeconds();
closeTime=hours*3600+mins*60+secs;
closeTime+=100000;
Timer();
}
 
function Timer(){
var time= new Date();
hours= time.getHours();
mins= time.getMinutes();
secs= time.getSeconds();
curTime=hours*3600+mins*60+secs
if (curTime>=closeTime){
document.all['divpop'].style.visibility = "hidden";
}
else{
window.setTimeout("Timer()",1000)}
}
 
 
function setCookie( name, value, expiredays ) { 
var todayDate = new Date(); 
todayDate.setDate( todayDate.getDate() + expiredays ); 
document.cookie = name + "=" + escape( value ) + "; path=/; expires=" + todayDate.toGMTString() + ";" 
} 
 
function closeWin() { 
if ( document.notice_form.chkbox.checked ){ 
setCookie( "maindiv", "done" , 1 ); 
} 
document.all['divpop'].style.visibility = "hidden";
}

function favor(){
window.external.AddFavorite('http://www.maincanada.com/', 'Ä³³ª´Ù Ä÷¸®ÄÄ±³À°Ã»')
}
