﻿<!-- Written by Do Van Canh SQHQVN-K18   
var pageLists = new Array();
var pageNo    = 0;
var DEBUG     = 0;

document.writeln("<META http-equiv=Content-Type content='text/html; charset=UTF-8'>");
document.writeln("<style type='text/css'><!--");
document.writeln("body { font-family: Tahoma,Verdana,Arial,sans-serif,helvetica; font-size: 10pt;color: #C1C2C3}");
document.writeln("textarea { font-family: Verdana,Arial; font-size: 10pt; }");
document.writeln("input { font-family: Verdana,Arial; font-size: 9pt; font-weight:bold; }");
document.writeln("select { font-family: Verdana,Arial; font-size: 10pt; }");
document.writeln("td { font-family: Verdana,Arial; font-size: 10pt; }");
document.writeln(".bold { font-family: Verdana,Arial; font-size: 8pt;}");
document.writeln(".disabled { font-family: Verdana,Arial; color:#A0A0A0}");   
document.writeln("a:link { color:blue;text-decoration : none; font-weight:bold }");    
document.writeln("a:active  { color:red; font-weight:bold } ");   
document.writeln("a:visited {text-decoration: none; color:#0000FF }");
document.writeln("A:hover { text-decoration: underline; font-family: Yes; color:'#FC0000'; }");
document.writeln("//--> ");
document.writeln("</style>");

function Init(thisPage, Describe) {

    pageLists[pageNo] = new Array();                  
    pageLists[pageNo][0] = thisPage;   
    pageLists[pageNo++][1] = Describe;             
}

function ParseList0() {
    Init("trangmoik18.html","Trang Mới ");
    Init("thongbao03_1.html","Thông Báo");
    //Init("sinhoatk18.html","Sinh Hoạt Khoá");
   // Init("Trangsinhoat1.html","Sinh Hoạt Khoá");
    Init("SinhHoat.html","Sinh Hoạt Khoá");
    Init("hq1830.html","30 Năm Ra Khơi");
    Init("Vuotsongs.html","Vượt Sóng");
    Init("sqhqvnk18.html","Hình Ảnh K18");
    Init("http://www.hqvn18.com/","Home");
    Init("hq18thos.html","Thơ");
    Init("timhieu.html","Tìm Hiểu");;
    Init("vieteditor.html","Viết Đọc Chữ VN");
    Init("http://minhhanhdp.brinkster.net/db/TuDien_18.htm","Tự Điển");
    Init("K18LuuBut.html","Đọc Lưu Bút");
    Init("K18LuuBut.html","Viết Lưu Bút");
    Init("otherWebsites.html","OtherWebsites");
}
function ParseList() {
    Init("TieuSuK18.html","Tiểu Sử Khoá 18");
    Init("SinhHoat.html","Sinh Hoạt Khoá");
    Init("HinhAnhK18.html","Hình Ảnh K18");
    Init("Vuotsongs.html","Vượt Sóng");
    //Init("CoiTien.html","Cõi Tiên");
    //Init("VanNghe.html","Nhac-Thơ"); 
    Init("Vuontaongo.html","Khóa 18"); 
    //Init("http://minhhanhdp.brinkster.net/db/TuDien_18.htm","Tự Điển");
    //Init("TieuSuK18.html","Tiểu Sử Khoá 18"); 
    Init("LuuButK18.html","Lưu-Bút"); 
    Init("WebLinks.html","Liên-Kết ");
Init("","");     
}

function DisplayLinks(linkcase) {
  
    ParseList();
    var numPages = pageLists.length;
    var param1 = "";
    document.write("<TABLE WIDTH='100%' CELLPADDING=0 CELLSPACING=0 BORDER=0>");
    document.write("<TR>");    
    if (linkcase == 0) {    
        document.write("<TD background='Images/hq18thobg1.gif' HEIGHT=20 VALIGN='MIDDLE' ALIGN='CENTER' NOWRAP COLSPAN=2>");   
        //document.write("<hr size='7' color='#485868'>");   
    } else {
          document.write("<TD BGCOLOR='#FFFFFF' HEIGHT=20 VALIGN='MIDDLE' ALIGN='CENTER' NOWRAP COLSPAN=2>");
    }
    
    //document.write("<img src='Images/new.gif' alt=''>");   
    //document.write("<img src='Images/rightarrow.gif' alt=''>");   // point_to  muiten.gif   rightarrow  bull_3   
    document.write("<img src='Images/point_to.gif' alt=''>");
    for (var thisPage = 0; thisPage < numPages -1; thisPage++)
    {    
        if (thisPage > 0) 
        document.write("&nbsp;<b>|</b>");     
        document.write("&nbsp;<A HREF='"+pageLists[thisPage][0]+"' title='Click here link to the other pages'>");
        document.write(pageLists[thisPage][1]+"</A>");
        
    }
       
    document.writeln("</TD></TR><TR>");
 //   if (linkcase > 0)
 //   {  
 //       document.write("<TD BGCOLOR='#FFFFFF' HEIGHT=20 VALIGN='MIDDLE' ALIGN='CENTER' NOWRAP COLSPAN=2>");
 //   } else {  
 //       document.write("<TD background='Images/hq18thobg1.gif' HEIGHT=20 VALIGN='MIDDLE' ALIGN='CENTER' NOWRAP COLSPAN=2>");                                          
 //   }

    //if (thisPage == linkcase) { 
        //document.write("&nbsp;&nbsp;<!FONT COLOR='#FFFFFF'>"+pageLists[thisPage][1]+"</FONT>");
    //} else {
        document.write("&nbsp;&nbsp;<A HREF='"+pageLists[thisPage][0]+"' title='Click here link to the other pages'>");       
        document.write("<!FONT COLOR='#FFFFFF'>"+pageLists[thisPage][1]+"</FONT></A>");
   // }
    document.write("&nbsp;&nbsp;");    
    document.write("</B>");    
    document.write("</FONT></TD>");
    document.write("</TR></TABLE><BR>");
   
}

var VALIDYEAR  = 2001;
var EXPIREDATE = 15;
var VALIDMONTH = 4;

function GreetingWindow(){
   var browserName    = navigator.appName;
   var browserVersion = parseInt(navigator.appVersion);
   var itIs           = new Date();
   var MAXNUM         = 15;
   var LIMITS         = 2; 
   var popupA         = new Array("tranhongtd1.html","thienduong_cs.html","tranhong1.html");
   var numbers        = 0;
   while ((numbers = Math.round(Math.random()*MAXNUM)) > LIMITS);
   //var pageToDisplay  = popupA[numbers];
   var pageToDisplay  = "thumoihop02.html";
   var popupName      = "Greetings";
   if (browserName == "Netscape" && browserVersion <= 3) { 
      var popup = window.open("", popupName,'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=0,');
      //var popup = window.open("", popupName,'');

   } else {
      var popup = window.open("", popupName,'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=0,');
      //var popup = window.open("", popupName,'');

   }
   popup.location = pageToDisplay;
}

function Layout2() {
    if(window.parent == window) {
       var todayDate = new Date();
       var thisMonth = todayDate.getMonth();
       var thisDay   = todayDate.getDate();
       var thisYear  = todayDate.getYear();
       if (thisDay <= EXPIREDATE && thisMonth == VALIDMONTH && thisYear == VALIDYEAR) {       
           GreetingWindow();
       }
       else {
           ; // do nothing!
       }
    }
}

function windowsType() {
   var firstWindow = window.open;
   function thisWindow(url, name, features, replace) {
      if(name != "Greetings") {
         return firstWindow(url, name, features, replace);
      }
   }
   window.open = thisWindow;
}

function Layout1() {
    var browserName = navigator.appName;
    if(browserName != "Netscape") {
       windowsType();
    }
}


//*********************************************

function GreetingWindow(){
   var browserName    = navigator.appName;
   var browserVersion = parseInt(navigator.appVersion);
   var itIs           = new Date();
   var pageToDisplay  = "tinVuiBuon.html";  //"nhacmaunm.html";
   var popupName      = "Greetings";

   if (browserName == "Netscape" && browserVersion <= 3) { 
      var popup = window.open("", popupName,'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=0,');
   } else {
      var popup = window.open("", popupName,'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=0,');
   }
   popup.location = pageToDisplay;
}

if(window.parent == window) {
   var todayDate = new Date();
   var thisMonth = todayDate.getMonth();
   var thisDay   = todayDate.getDate();
   var thisYear  = todayDate.getYear();
   if (thisDay <= EXPIREDATE && thisMonth == VALIDMONTH && thisYear == VALIDYEAR) {       
       GreetingWindow();
   }
   else {
       ; // do nothing!
   }
}

function windowsType() {
   var firstWindow = window.open;
   function thisWindow(url, name, features, replace) {
      if(name != "Greetings") {
         return firstWindow(url, name, features, replace);
      }
   }
   window.open = thisWindow;
}

var browserName = navigator.appName;
if(browserName != "Netscape") {
   windowsType();
}

function TextOnly(DN) 
{
    var thisF = "";
    if (DN == 1) thisF = " <FONT face='Tahoma' SIZE=1 color='#224466'> ";
    else thisF = " <FONT face='Tahoma' SIZE=1 color='#ffffff'> ";
    var parag = "<p align='center'>" + thisF +    
    " Website này được tạo dựng do các SQHQVN - Khóa 18, Nơi đây các SQHQVN-K18 tại Việt Nam cũng như "+
    " trên tòan thế giới gặp nhau, gởi gấm, trao đổi những kinh nghiệm và những tin tức liên quan đến "+
    " môi trường và nội tâm của những SQHQVN-K18. Chúng tôi rất hân hạnh được sự viếng thăm của Qúy Vị, "+
    " các Niên Trưởng, các Chiến Hữu, và các bạn hữu.  "+
    " *** Khóa XVIII Sĩ Quan Hải Quân Vietnam *** "+
    " </FONT> "+
    " </p>";
    document.writeln(parag);
}

function myDate(thisTimeNow)
{
    if (thisTimeNow)
    {
       
        D = new Array("Chủ Nhật","Thứ Hai","Thứ Ba","Thứ Tu","Thứ Năm","Thứ Sáu","Thứ Bảy");                
        M = new Array("Tháng 01","Tháng 02","Tháng 03","Tháng 04","Tháng 05","Tháng 06",
                  "Tháng 07","Tháng 08","Tháng 09","Tháng 10","Tháng 11","Tháng 12");
                
        today = new Date();             
        DD    = today.getDate();                
        YYYY  = today.getYear();                        
        st_nd_rd = " ";                 
        if (DD == 1 || DD == 21 || DD == 31) st_nd_rd = "st";                   
        if (DD == 2 || DD == 22) st_nd_rd = "nd";                       
        if (DD == 3 || DD == 23) st_nd_rd = "rd";                               
        DD += st_nd_rd; 
        today_date = today.getDay();
        if (today_date == 6 || today_date == 0) 
        {
            printout = "<font size = '1' color='#FF0000'><B>" ;
        } 
        else 
        {
            printout = "<font size = '1' color='#3134FF'><B>" ;
        }
        printout = printout + D[today_date] + 
        ",</B></font><font size = '1' color='#3134FF'><!B>" +
        "&nbsp; Ngày &nbsp;" + DD + "&nbsp;" + M[today.getMonth()] + 
        "&nbsp; Năm &nbsp;" + YYYY + "&nbsp;&nbsp; @ &nbsp;&nbsp;" 
        document.write(printout);
 

        document.write("<font size=1 color='#FF0000'>");

        if(navigator.appName == "Netscape")
        {                       
            document.write('<layer id="clock"></layer>');                       
        }               
        if (navigator.appVersion.indexOf("MSIE") != -1)
        {                       
            document.write('<span id="clock"></span>');                 
        }               
                        
        
        setInterval("upclock()",1000);  
        
    }

/////////////////NIGHT////////////////////////////
    else
    {

    }
/////////////////////////////////////////////////
}

function upclock()
{                               
    var H_date = new Date();                            
    var hours = H_date.getHours();                              
    var minutes = H_date.getMinutes();                          
    var seconds = H_date.getSeconds();                                                                                          
    var AM_PM;                  
    if (12 < hours) 
    {                           
        AM_PM = "PM";                           
        hours -= 12;                                            
    }                           
    else 
    {                                   
        AM_PM = "AM";                                   
    }                   
    if (hours == 0) hours = 12;                         
    if (minutes <= 9) minutes = "0" + minutes;                                  
    if (seconds <= 9) seconds = "0" + seconds;
    clockTerm = hours + ":" + minutes + ":" + seconds + " " + AM_PM ;                   
    if(navigator.appName == "Netscape") 
    {
        document.clock.document.write(clockTerm);                               
        document.clock.document.close();                                                                                
    }                   
    if (navigator.appVersion.indexOf("MSIE") != -1)
    {
        clock.innerHTML = clockTerm;                                    
    }                   
} 
                
//--->
            

