var size = 10;
function fontsize(a){
  document.write("<div id=\"sty1\" style=\"font-size:" + a + "pt; line-height:130%\">");
  }
function getCookie(key){
   tmp = document.cookie + ';';
   tmp1 = tmp.indexOf(key,0);
   if (tmp1 != -1){
       tmp=tmp.substring(tmp1,tmp.length);
       start=tmp.indexOf("=",0) + 1;
       end=tmp.indexOf(";",start);
       return(unescape(tmp.substring(start,end)));
       }
    return("");
    }
    
function big(){
   size = getCookie("fontsize");
   if (size == "NaN" || size == ""){
  	size = 11;
  	}
   a = parseInt(size) + 2;
   temp = "fontsize=" + a + "; ";
   temp += "expires=Fri, 31-Dec-2010 23:59:59 GMT; ";
   temp += "path=/; ";
   document.cookie=temp;
   location.reload(true);
   }
   
function small(){
   size = getCookie("fontsize");
   if (size == "NaN" || size == ""){
  	size = 12;
  	}
   a = parseInt(size) - 2;
   temp = "fontsize=" + a + "; ";
   temp += "expires=Fri, 31-Dec-2010 23:59:59 GMT; ";
   temp += "path=/; ";
   document.cookie=temp;
   location.reload(true);
   }

function disp(){
   document.write("font size= " + getCookie("fontsize"));
   }




function sendpage(url){
    file = "http://www.worldtimes.co.jp/cgi2/sendmail.cgi" + url;
    w = window.open(file,"wind1","width=550,height=450,left=50,top=50,scrollbars=yes");
    }

function geturl(){
    return "?url=" + document.location + "&title=" + document.title;
}

function dispurl(){
    url = document.location;
    title = document.title;
    document.write(url);
    document.write("<br>");
    document.write(title);
}

function clip(url){
    file = "http://www.worldtimes.co.jp/cgi2/clip.cgi" + url;
    w = window.open(file,"wind1","width=500,height=300,left=50 top=50");
    }

function help(){
    file = "http://www.worldtimes.co.jp/cgi2/help.html";
    w = window.open(file,"wind1","width=500,height=350,left=50 top=50");
    }

function print(url){
    file = "http://www.worldtimes.co.jp/cgi2/print.cgi" + url;
    w = window.open(file,"wind1","width=500,height=600,left=50,top=50,scrollbars=yes,menubar=yes");
    }

function print2(url){
    file = "http://www.worldtimes.co.jp/cgi2/print-test.cgi" + url;
    w = window.open(file,"wind1","width=500,height=600,left=50,top=50,scrollbars=yes,menubar=yes,menubar=yes");
    }

function qes(url){
    file = "http://www.worldtimes.co.jp/cgi2/question.cgi" + url;
    w = window.open(file,"wind1","width=500,height=600,left=50,top=50,scrollbars=yes");
    }

function sel(){
    x = document.selection.createRange();
    return x.text;
    }

function search(word){
   temp = "query=" + word + "; ";
   temp += "expires=Fri, 31-Dec-2010 23:59:59 GMT; ";
   temp += "path=/; ";
   document.cookie=temp;

    file = "http://www.worldtimes.co.jp/cgi2/search2.cgi";
    w = window.open(file,"wind1","width=300,height=170,left=50,top=50");
    }

function search_org(word){
    file = "http://www.worldtimes.co.jp/cgi2/search.cgi?word=" + word;
    w = window.open(file,"wind1","width=300,height=170,left=50 top=50");
    }


function opensearch(){
   md = getCookie("searchwin");
   if (md == "auto"){
        search(sel());
        }
    }

