﻿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 show_submenu(lyr) { 

//document.all.Layer1.style.visibility="visible";
document.all[lyr].style.visibility="visible";
document.all.Submenu.style.width = btn_product.width;
document.all.Submenu2.style.width = btn_about.width;
document.all.Submenu3.style.width = btn_about.width;
}

function hide_submenu(lyr) { 
//document.all.Layer1.style.visibility="hidden";
document.all[lyr].style.visibility="hidden";
}

function movein(which){
//which.style.background='coral';
//which.style.background='#92CC2A';
which.style.background='#ACCA3E';
//which.style.background='#BABE56';
}

function moveout(which){
which.style.background='#F0F0F0';
}

function iframe_autoresize(arg) {
    arg.height = 450;
    var frameheight = eval(arg.name + ".document.body.scrollHeight");    
    if (frameheight < 450)
        arg.height = 450;
    else
        arg.height = frameheight;
}

function set_text(which, arg) {    
    which.innerText = arg;
}

/*
function set_indicator(arg) {
    //document.all.indicator.innerText = arg;
    indicator.innerText = arg;
}

function set_indicator_html(arg) {
    indicator.innerHTML = arg;
}*/
var curBannerText = 0;
function rotate_banner_text() {    
    var strBannerText = new Array(6);
    //strBannerText[0] = "Open Source / Inventory, Asset and \nResource Management System for Telecom OSS";
    //strBannerText[1] = "GATIF™/Waypoint™ is a \"true\" open source product offering for OSS.";
    //strBannerText[2] = "Waypoint™'s core source code is available for download by any registered user.";
    //strBannerText[3] = "GATIF™ provides paid support / consulting to any registered user.";
    //strBannerText[4] = "Using open source allows you to develop code for \nwhat DOES NOT exist, as opposed to licensing what DOES.";
    //strBannerText[5] = "Waypoint™ is the ONLY Windows™ based open-source software suite for OSS ";
    strBannerText[0] = "Open Source / Inventory, Asset and <br />Resource Management System for Telecom OSS";
    strBannerText[1] = "GATIF™/Waypoint™ is a &quot;true&quot; open source product offering for OSS.";
    strBannerText[2] = "Waypoint™&#39;s core source code is available for download by any registered user.";
    strBannerText[3] = "GATIF™ provides paid support / consulting to any registered user.";
    strBannerText[4] = "Using open source allows you to develop code for \nwhat DOES NOT exist, as opposed to licensing what DOES.";
    strBannerText[5] = "Waypoint™ is the ONLY Windows™ based open-source software suite for OSS ";


    //banner.innerText = strBannerText[curBannerText];
    banner.innerHTML = strBannerText[curBannerText];
    curBannerText++;
    if (curBannerText > 5) curBannerText = 0;
}

//function make_indicator_html() {    
function set_indicator() {    
    var retString = "";
    for (i = 0; i < arguments.length; i+=2) {
        retString += " &gt; <a href=\"" + arguments[i+1] +
            "\" target=main_frame class=copy style=\"font-size:12px\">" + arguments[i] + "</a>"
    }
    //alert(retString);
    indicator.innerHTML = retString;
    //return retString;
    rotate_banner_text();
}

function check_ie_and_modify_language() {    
    var strSpanish = "Spanish";
    var strKorean = "Korean";
    var strChinese = "Chinese";    
    
    if ((navigator.appVersion.indexOf("MSIE 7") > -1) || (navigator.appVersion.indexOf("MSIE 8") > -1)) {
        strSpanish = "Español";
        strKorean = "한국어";
        strChinese = "中文";        
    }      
    
    lang_option.innerHTML =
        "<b>English </b>| <a class=\"copy\">" + strSpanish +
        "</a> | <a href=\"../Korean/home.html\" class=\"copy\">" + strKorean +
        //"</a> | <a class=\"copy\">" + strKorean +
        "</a> | <a href=\"../Chinese/home.html\" class=\"copy\">" + strChinese + "</a>"
}

function refresh_login_status() {
    if (navigator.appName == "Netscape") {        
    //if (navigator.userAgent.indexOf("Firefox") > -1){
        top.location.reload();        
    }
    else {
        login_status.location.reload();
    }
}

function get_parameter() {    
    var astrParameters = location.search.split("?");
    if (astrParameters.length > 1) {
        return astrParameters[1];
    }
    return "";    
}

function display_page() {    
    desc_page = get_parameter();
    if (desc_page == "downloads_install.html" || desc_page == "downloads_sourcecode.asp") {
        if (navigator.appName == "Netscape") {
            id_main_frame.src = desc_page;
        }
        else {
            id_main_frame.location = desc_page;
        }
    }    
    else {        
        if (navigator.appName == "Netscape") {
            id_main_frame.src = "content_home.html";
        }
        else {
            id_main_frame.location = "content_home.html";
        }
    }
    
}