/*-------------------------------------------- start of remember me function -----------------------------------------------*/

<!-- Paste this code into an external JavaScript file named: rememberMe.js  -->

/* This script and many more are available free online at
The JavaScript Source :: http://javascript.internet.com
Cookie script - Scott Andrew
Popup script, Copyright 2005, Sandeep Gangadharan */
<!--
function newCookie(name,value,days) {
 var days = 10;   
 // the number at the left reflects the number of days for the cookie to last
 // modify it according to your needs
 if (days) {
  var date = new Date();
  date.setTime(date.getTime()+(days*24*60*60*1000));
  var expires = "; expires="+date.toGMTString(); }
  else var expires = "";
  document.cookie = name+"="+value+expires+"; path=/"; }

function readCookie(name) {
  var nameSG = name + "=";
  var nuller = '';
 if (document.cookie.indexOf(nameSG) == -1)
   return nuller;

  var ca = document.cookie.split(';');
 for(var i=0; i<ca.length; i++) {
   var c = ca[i];
   while (c.charAt(0)==' ') c = c.substring(1,c.length);
 if (c.indexOf(nameSG) == 0) return c.substring(nameSG.length,c.length); }
   return null; }

function eraseCookie(name) {
 newCookie(name,"",1); }

function toMem(a) {
   newCookie('theName', document.formlogmasuk.katanama.value);     // add a new cookie as shown at left for every
   newCookie('thePassword', document.formlogmasuk.katalaluan.value);   // field you wish to have the script remember
}

function delMem(a) {
 eraseCookie('theName');   // make sure to add the eraseCookie function for every field
 eraseCookie('thePassword');

  document.formlogmasuk.katanama.value = '';   // add a line for every field
  document.formlogmasuk.katalaluan.value = ''; }


function remCookie() {
document.formlogmasuk.katanama.value = readCookie("theName");
document.formlogmasuk.katalaluan.value = readCookie("thePassword");
if(document.formlogmasuk.katanama.value != "" && document.formlogmasuk.katalaluan.value != "")
document.formlogmasuk.checker.checked = true;
if(document.formlogmasuk.katanama.value == "" && document.formlogmasuk.katalaluan.value == "")
document.formlogmasuk.checker.checked = false;
}

// Multiple onload function created by: Simon Willison
// http://simon.incutio.com/archive/2004/05/26/addLoadEvent
function addLoadEvent(func) {
 var oldonload = window.onload;
 if (typeof window.onload != 'function') {
   window.onload = func;
 } else {
   window.onload = function() {
     if (oldonload) {
       oldonload();
     }
     func();
   }
 }
}

addLoadEvent(function() {
 remCookie();
});

/*----------------------------------------------- end of remember me function --------------------------------------------------*/

/*------------------------------------------ start of hide and display function ------------------------------------------------*/

function showTableCarian(){
	newCookie('Display', 'DisplayTrue'); 
	document.getElementById('TableCarian').style.display = '';
	document.getElementById('hideLink').style.display = '';
	document.getElementById('showLink').style.display = 'none'
}

function hideTableCarian(){
	newCookie('Display', 'DisplayFalse'); 
	document.getElementById('TableCarian').style.display = 'none';
	document.getElementById('hideLink').style.display = 'none';
	document.getElementById('showLink').style.display = ''
}

function checkCookieTableCarian(){
	var DisplayCookie;
	DisplayCookie = readCookie("Display");
	if(DisplayCookie=='DisplayTrue')
	{
	document.getElementById('TableCarian').style.display = '';
	document.getElementById('hideLink').style.display = '';
	document.getElementById('showLink').style.display = 'none'
	}
	if(DisplayCookie=='DisplayFalse')
	{
	document.getElementById('TableCarian').style.display = 'none';
	document.getElementById('hideLink').style.display = 'none';
	document.getElementById('showLink').style.display = ''
	}
	if(DisplayCookie=='')
	{
	document.getElementById('TableCarian').style.display = 'none';
	document.getElementById('hideLink').style.display = 'none';
	document.getElementById('showLink').style.display = ''
	}
}

/*------------------------------------------ end of hide and display function ------------------------------------------------*/
/*-------------------------------------------- start of enableTextarea polls function -------------------------------------------------*/

function OpenWin() 
{
	window.open('/ehome/ehomebi/profil/carta.cfm','NewWinD','width=1000,height=800,left=0,top=0,scrollbars=yes,resizable=yes');
}
/*---------------------------------------------- end of enableTextarea polls function --------------------------------------------------*/
/*-------------------------------------------- start of enableTextarea polls function -------------------------------------------------*/

function organisasi(pagestr) 
{
	
	window.open(pagestr,'NewWin','width=600,height=400,left=0,top=0,scrollbars=yes');
}
/*---------------------------------------------- end of enableTextarea polls function --------------------------------------------------*/

/*-------------------------------------------- start of enableTextarea polls function -------------------------------------------------*/

function enableTextarea(form, valuestr) 
{
	/*alert('valuestr: '+valuestr);*/
	if(valuestr=="baru")
	{
		/*el.disabled = false;*/
		document.getElementById('PollQuestionBox').style.display = '';
	}
	else
	{
		/*el.disabled = true;*/
		document.getElementById('PollQuestionBox').style.display = 'none';
	}
}
/*---------------------------------------------- end of enableTextarea polls function --------------------------------------------------*/
/*------------------------------------- start of currency format function ---------------------------------------------------------*/
function checkNum(data) {      // checks if all characters 
var valid = "0123456789.";     // are valid numbers or a "."
var ok = 1; var checktemp;
for (var i=0; i<data.length; i++) {
checktemp = "" + data.substring(i, i+1);
if (valid.indexOf(checktemp) == "-1") return 0; }
return 1;
}
function dollarAmount(form, field) { // idea by David Turley
Num = "" + eval("document." + form + "." + field + ".value");
dec = Num.indexOf(".");
end = ((dec > -1) ? "" + Num.substring(dec,Num.length) : ".00");
end = ((dec > -1) ? "" + Num.substring(dec,Num.length) : "");
Num = "" + parseInt(Num);
var temp1 = "";
var temp2 = "";
if (checkNum(Num) == 0) {
alert("Value those included void.\n(Value among 0-9 and  '.')");
eval("document." + form + "." + field + ".value = '';");
}
else { 
if (end.length == 2) end += "0";
if (end.length == 1) end += "00";
if (end == "") end += ".00";
var count = 0;
for (var k = Num.length-1; k >= 0; k--) {
var oneChar = Num.charAt(k);
if (count == 3) {
temp1 += "";
temp1 += oneChar;
count = 1;
continue;
}
else {
temp1 += oneChar;
count ++;
}
}
for (var k = temp1.length-1; k >= 0; k--) {
var oneChar = temp1.charAt(k);
temp2 += oneChar;
}
/*temp2 = "$" + temp2 + end;*/
temp2 = temp2 + end;
eval("document." + form + "." + field + ".value = '" + temp2 + "';");
}
}
/*--------------------------------------- end of currency format function ---------------------------------------------------------*/

/*--------------------------------------- start prefilled text function --------------------------------------------*/

function ClearText(field){
var fieldstr = document.getElementById(field);
fieldstr.value = "";
}

function ReplaceText(field, textstr){
var fieldstr = document.getElementById(field);
if(fieldstr.value=="")
fieldstr.value = "Please include"+textstr;
}



/*--------------------------------------- start prefilled text function --------------------------------------------*/

/*------------------------------------------ start of hide and display function ------------------------------------------------*/

var expDate = new Date();
expDate.setTime(expDate.getTime()+365*24*60*60*1000); // one year

function setCookie(isName,isValue,dExpires, path){
document.cookie = isName+"="+isValue+";expires="+dExpires.toGMTString()+path;
}

function getCookie(isName){

cookieStr = document.cookie;
startSlice = cookieStr.indexOf(isName+"=");
if (startSlice == -1){return false}
endSlice = cookieStr.indexOf(";",startSlice+1)
if (endSlice == -1){endSlice = cookieStr.length}
isData = cookieStr.substring(startSlice,endSlice)
isValue = isData.substring(isData.indexOf("=")+1,isData.length);
return isValue;
}

function removeWelcome(){

setCookie('DisplayStatus','DisplayFalse',expDate);
document.getElementById('TableCarian').style.display = 'none';
document.getElementById('hideLink').style.display = 'none'
document.getElementById('showLink').style.display = '';
}

function showWelcome(){

setCookie('DisplayStatus','DisplayTrue',expDate);
document.getElementById('TableCarian').style.display = '';
document.getElementById('hideLink').style.display = ''
document.getElementById('showLink').style.display = 'none';
}

function checkCookie(){

nValue = getCookie('DisplayStatus');
if (nValue == 'DisplayFalse')
{
document.getElementById('TableCarian').style.display = 'none';
document.getElementById('hideLink').style.display = 'none';
document.getElementById('showLink').style.display = ''
}
else
{
document.getElementById('TableCarian').style.display = '';
document.getElementById('hideLink').style.display = '';
document.getElementById('showLink').style.display = 'none'
}
}

/*function toggleDisplay(){
    if (document.getElementById('TableCarian').style.display == 'none')
    {
      document.getElementById('TableCarian').style.display = '';
    } 
	else 
	{
      document.getElementById('TableCarian').style.display = 'none';
    }
}*/

/*------------------------------------------ end of hide and display function ------------------------------------------------*/

/*------------------------------------------ start of tabber cookie function ------------------------------------------------*/

/*==================================================
  Set the tabber options (must do this before including tabber.js)
  ==================================================*/
var tabberOptions = {

  'cookie':"tabber", /* Name to use for the cookie */

  'onLoad': function(argsObj)
  {
    var t = argsObj.tabber;
    var i;

    /* Optional: Add the id of the tabber to the cookie name to allow
       for multiple tabber interfaces on the site.  If you have
       multiple tabber interfaces (even on different pages) I suggest
       setting a unique id on each one, to avoid having the cookie set
       the wrong tab.
    */
    if (t.id) {
      t.cookie = t.id + t.cookie;
    }

    /* If a cookie was previously set, restore the active tab */
    i = parseInt(getCookie(t.cookie));
    if (isNaN(i)) { return; }
    t.tabShow(i);
    /*alert('getCookie(' + t.cookie + ') = ' + i);*/
  },

  'onClick':function(argsObj, name, path, domain)
  {
    var c = argsObj.tabber.cookie;
    var i = argsObj.index;
    /*alert('setCookie(' + c + ',' + i + ')');*/
    setCookie(c, i);
	/*document.location.href = window.location.pathname;*/
  }
};

/*==================================================
  Cookie functions
  ==================================================*/
function setCookie(name, value, expires, path, domain, secure) {
    document.cookie= name + "=" + escape(value) +
        ((expires) ? "; expires=" + expires.toGMTString() : "") +
        ((path) ? "; path=" + path : "") +
        ((domain) ? "; domain=" + domain : "") +
        ((secure) ? "; secure" : "");
}

function getCookie(name) {
    var dc = document.cookie;
    var prefix = name + "=";
    var begin = dc.indexOf("; " + prefix);
    if (begin == -1) {
        begin = dc.indexOf(prefix);
        if (begin != 0) return null;
    } else {
        begin += 2;
    }
    var end = document.cookie.indexOf(";", begin);
    if (end == -1) {
        end = dc.length;
    }
    return unescape(dc.substring(begin + prefix.length, end));
}
function deleteCookie(name, path, domain) {
    if (getCookie(name)) {
        document.cookie = name + "=" +
            ((path) ? "; path=" + path : "") +
            ((domain) ? "; domain=" + domain : "") +
            "; expires=Thu, 01-Jan-70 00:00:01 GMT";
    }
}
/*------------------------------------------ start of tabber cookie function ------------------------------------------------*/


/*------------------------------------------ start of change image function ------------------------------------------------*/
function changeImage(imagestr)
{
	document.tableberitaimage.src='/ehomebi/template/images/'+imagestr;
}
/*------------------------------------------ end of change image function ------------------------------------------------*/
/*------------------------------------------ start of blinking function ------------------------------------------------*/

spe=250;
NameOfYourTags="mi";

swi=1;
na=document.getElementsByName(NameOfYourTags);

bringBackBlinky();

function bringBackBlinky() {

if (swi == 1) {
sho="visible";
swi=0;
}
else {
sho="hidden";
swi=1;
}

for(i=0;i<na.length;i++) {
na[i].style.visibility=sho;
}

setTimeout("bringBackBlinky()", spe);
}
/*--------------------------------------------- end of blinking function ---------------------------------------------------*/
/*------------------------------------------ start of window print function ------------------------------------------------*/
function printsheet()
{
	window.print();
}
/*------------------------------------------ end of window print function ------------------------------------------------*/

/*------------------------------------------ start of window page last update function--------------------------------*/
function PageLastUpdated(){
var date = new Date(document.lastModified);
document.write("<I>Last Updated : "+ date.getDate()+ "/" +(date.getMonth()+1)+ "/" 
 + date.getYear() + "</I>"); 
}

  /*------------------------------------------ end of window page last update function --------------------------------*/ 
/*------------------------------------------ start of expand/collapse function ------------------------------------------------*/

	function Show_Stuff(Click_Menu)
	// Function that will swap the display/no display for
	// all content within span tags
	{
		displayyesstr=getCookie('displayyes');

		if (Click_Menu.style.display == "none")
		{
			Click_Menu.style.display = "";
			/*setCookie('displayyes',"none",'');
			alert(displayyesstr);*/
		}
		else
		{
			Click_Menu.style.display = "none";
			/*setCookie('displayyes',"",'');
			alert(displayyesstr);*/
		}

	}
/*------------------------------------------ start of expand/collapse function ------------------------------------------------*/


/*------------------------------------------ start of delete comfirmation function ------------------------------------------------*/

function confirmaction(url)
{
	var message = confirm("Are you sure to delete?")
	if (message)
		window.location = url;
}

/*--------------------------------------------- end delete comfirmation function ---------------------------------------------------*/

/*------------------------------------------ start of delete comfirmation function ------------------------------------------------*/

function confirmactionlogoff(url)
{
	var message = confirm("Are you sure to log off?")
	if (message)
		window.location = url;
}

/*--------------------------------------------- end delete comfirmation function ---------------------------------------------------*/

/*------------------------------------- start of change background row colour function ---------------------------------------------*/

function highliteover(id, color)
{
	document.getElementById(id).style.background='url("/ehome/templatebi/images/tablebg.png")';
}

function highliteout(id, color)
{
	document.getElementById(id).style.background=color;
}

/*--------------------------------------- end of change background row colour function ---------------------------------------------*/

/*----------------------------------------- start of display element function ------------------------------------------------------*/

function toggle_it(itemID)
{
	/*alert('itemID:' + itemID);*/
    // Toggle visibility between none and inline
    if ((document.getElementById(itemID).style.display == 'none'))
    {
      document.getElementById(itemID).style.display = '';
    } else {
      document.getElementById(itemID).style.display = 'none';
    }
}
/*----------------------------------------- start of display element function ------------------------------------------------------*/


/*----------------------------------------- start of display element function ------------------------------------------------------*/
function jumpTo(form)
{
   form.action = "index.cfm";
   form.submit();
} 
/*----------------------------------------- end of display element function ------------------------------------------------------*/


/*----------------------------------------- start of image function ----------------------------------------------------------------*/

if (document.images) {
 img_on =new Image();  img_on.src ="images/homeover.png"; 
 img_off=new Image();  img_off.src="images/home.png"; 
}

function handleOver() { 
 if (document.images) document.imgName.src=img_on.src;
}

function handleOut() {
 if (document.images) document.imgName.src=img_off.src;
}

/*------------------------------------------- end of image function ----------------------------------------------------------------*/

/*------------------------------ start of difference between date function ---------------------------------------------------------*/
function days_between(date1, date2) {

    // The number of milliseconds in one day
    var ONE_DAY = 1000 * 60 * 60 * 24

    // Convert both dates to milliseconds
    var date1_ms = date1.getTime()
    var date2_ms = date2.getTime()

    // Calculate the difference in milliseconds
    var difference_ms = Math.abs(date1_ms - date2_ms)
    
    // Convert back to days and return
    return Math.round(difference_ms/ONE_DAY)

}

/*-------------------------------- end of difference between date function ---------------------------------------------------------*/

/*----------------------------------------- start of clock function ----------------------------------------------------------------*/
function startclock()
{
var thetime=new Date();

var nhours=thetime.getHours();
var nmins=thetime.getMinutes();
var nsecn=thetime.getSeconds()
var AorP=" ";

if (nhours>=12)
    AorP="PM";
else
    AorP="AM";

if (nhours>=13)
    nhours-=12;

if (nhours==0)
 nhours=12;

if (nsecn<10)
 nsecn="0"+nsecn;

if (nmins<10)
 nmins="0"+nmins;

  var now = new Date();
  var today = now.getDate();
  var month = now.getMonth();
    var monthName = new Array(12)
      monthName[0]="January";
      monthName[1]="February";
      monthName[2]="March";
      monthName[3]="April";
      monthName[4]="May";
      monthName[5]="June";
      monthName[6]="July";
      monthName[7]="August";
      monthName[8]="September";
      monthName[9]="October";
      monthName[10]="November";
      monthName[11]="December";
  var year = now.getFullYear();

document.clockform.clockspot.value=today+" "+monthName[month]+" "+year+" "+nhours+":"+nmins+":"+nsecn+" "+AorP;

setTimeout('startclock()',1000);

}

/*----------------------------------------- end of clock function ----------------------------------------------------------------*/

/*----------------------------------------- start of calendar function -------------------------------------------------------------*/

var oldLink = null;
// code to change the active stylesheet
function setActiveStyleSheet(link, title) {
  var i, a, main;
  for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {
    if(a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("title")) {
      a.disabled = true;
      if(a.getAttribute("title") == title) a.disabled = false;
    }
  }
  if (oldLink) oldLink.style.fontWeight = 'normal';
  oldLink = link;
  link.style.fontWeight = 'bold';
  return false;
}

// This function gets called when the end-user clicks on some date.
function selected(cal, date) {
  cal.sel.value = date; // just update the date in the input field.
  if (cal.dateClicked && (cal.sel.id == "sel1" || cal.sel.id == "sel3"))
    // if we add this call we close the calendar on single-click.
    // just to exemplify both cases, we are using this only for the 1st
    // and the 3rd field, while 2nd and 4th will still require double-click.
    cal.callCloseHandler();
}

// And this gets called when the end-user clicks on the _selected_ date,
// or clicks on the "Close" button.  It just hides the calendar without
// destroying it.
function closeHandler(cal) {
  cal.hide();                        // hide the calendar
//  cal.destroy();
  calendar = null;
}

// This function shows the calendar under the element having the given id.
// It takes care of catching "mousedown" signals on document and hiding the
// calendar if the click was outside.
function showCalendar(id, format, showsTime, showsOtherMonths) {
  var el = document.getElementById(id);
  if (calendar != null) {
    // we already have some calendar created
    calendar.hide();                 // so we hide it first.
  } else {
    // first-time call, create the calendar.
    var cal = new Calendar(true, null, selected, closeHandler);
    // uncomment the following line to hide the week numbers
    // cal.weekNumbers = false;
    if (typeof showsTime == "string") {
      cal.showsTime = true;
      cal.time24 = (showsTime == "24");
    }
    if (showsOtherMonths) {
      cal.showsOtherMonths = true;
    }
    calendar = cal;                  // remember it in the global var
    cal.setRange(1900, 2070);        // min/max year allowed.
    cal.create();
  }
  calendar.setDateFormat(format);    // set the specified date format
  calendar.parseDate(el.value);      // try to parse the text in field
  calendar.sel = el;                 // inform it what input field we use

  // the reference element that we pass to showAtElement is the button that
  // triggers the calendar.  In this example we align the calendar bottom-right
  // to the button.
  calendar.showAtElement(el.nextSibling, "Br");        // show the calendar

  return false;
}

var MINUTE = 60 * 1000;
var HOUR = 60 * MINUTE;
var DAY = 24 * HOUR;
var WEEK = 7 * DAY;

// If this handler returns true then the "date" given as
// parameter will be disabled.  In this example we enable
// only days within a range of 10 days from the current
// date.
// You can use the functions date.getFullYear() -- returns the year
// as 4 digit number, date.getMonth() -- returns the month as 0..11,
// and date.getDate() -- returns the date of the month as 1..31, to
// make heavy calculations here.  However, beware that this function
// should be very fast, as it is called for each day in a month when
// the calendar is (re)constructed.
function isDisabled(date) {
  var today = new Date();
  return (Math.abs(date.getTime() - today.getTime()) / DAY) > 10;
}

function flatSelected(cal, date) {
  var el = document.getElementById("preview");
  el.innerHTML = date;
}

function showFlatCalendar() {
  var parent = document.getElementById("display");

  // construct a calendar giving only the "selected" handler.
  var cal = new Calendar(true, null, flatSelected);

  // hide week numbers
  cal.weekNumbers = false;

  // We want some dates to be disabled; see function isDisabled above
  cal.setDisabledHandler(isDisabled);
  cal.setDateFormat("%A, %B %e");

  // this call must be the last as it might use data initialized above; if
  // we specify a parent, as opposite to the "showCalendar" function above,
  // then we create a flat calendar -- not popup.  Hidden, though, but...
  cal.create(parent);

  // ... we can show it here.
  cal.show();
}

//-->

/*----------------------------------------- end of calendar function -------------------------------------------------------------*/

/*
Flashing form element Script- © Dynamic Drive (www.dynamicdrive.com)
For full source code, visit http://www.dynamicdrive.com/
This credit MUST stay intact for use
*/

var flashcolor="red"
var flashinterval=1000 //flash interval in miliseconds (1000=1 sec)

var formcollect=document.getElementsByTagName? document.getElementsByTagName("FORM") : document.all? document.all.tags("FORM") : new Array()
var flashcollect=new Array()

for (i=0; i<formcollect.length; i++){
for (e=0; e<formcollect[i].elements.length; e++){
if (formcollect[i].elements[e].className=="flashit")
flashcollect[flashcollect.length]=formcollect[i].elements[e]
}
}

function flashelements(){
for (f=0; f<flashcollect.length; f++){
if (flashcollect[f].style.color=='')
flashcollect[f].style.color=flashcolor
else
flashcollect[f].style.color=""
}
}

if (flashcollect.length>0)
setInterval("flashelements()",flashinterval)

/*------------------------------------------ start of new ic function ------------------------------------------------*/

function check_info(src) {
    var icno = src.value;
    if(icno.length == 6) {
        var icno_1 = icno.substr(0,6);
        src.value = icno_1 + "-"         
    }
    if(icno.length == 9) {
        var icno_1 = icno.substr(0,9);
        src.value = src.value + "-"         
    }
} 
/*--------------------------------------------- end new ic function ---------------------------------------------------*/

/*var min=10;
var max=14;
function increaseFontSize() {
   var p = document.getElementsByTagName('div');
   for(i=0;i<p.length;i++) {
      if(p[i].style.fontSize) {
         var s = parseInt(p[i].style.fontSize.replace("px",""));
      } else {
         var s = 12;
      }
      if(s!=max) {
         s = 14;
      }
      p[i].style.fontSize = s+"px"
   }
   var p = document.getElementsByTagName('p');
   for(i=0;i<p.length;i++) {
      if(p[i].style.fontSize) {
         var s = parseInt(p[i].style.fontSize.replace("px",""));
      } else {
         var s = 12;
      }
      if(s!=max) {
         s = 14;
      }
      p[i].style.fontSize = s+"px"
   }
   var p = document.getElementsByTagName('span');
   for(i=0;i<p.length;i++) {
      if(p[i].style.fontSize) {
         var s = parseInt(p[i].style.fontSize.replace("px",""));
      } else {
         var s = 12;
      }
      if(s!=max) {
         s = 14;
      }
      p[i].style.fontSize = s+"px"
   }
   var p = document.getElementsByTagName('input');
   for(i=0;i<p.length;i++) {
      if(p[i].style.fontSize) {
         var s = parseInt(p[i].style.fontSize.replace("px",""));
      } else {
         var s = 12;
      }
      if(s!=max) {
         s = 14;
      }
      p[i].style.fontSize = s+"px"
   }
   var p = document.getElementsByTagName('a');
   for(i=0;i<p.length;i++) {
      if(p[i].style.fontSize) {
         var s = parseInt(p[i].style.fontSize.replace("px",""));
      } else {
         var s = 12;
      }
      if(s!=max) {
         s = 14;
      }
      p[i].style.fontSize = s+"px"
   }
   var p = document.getElementsByTagName('font');
   for(i=0;i<p.length;i++) {
      if(p[i].style.fontSize) {
         var s = parseInt(p[i].style.fontSize.replace("px",""));
      } else {
         var s = 12;
      }
      if(s!=max) {
         s = 14;
      }
      p[i].style.fontSize = s+"px"
   }
}

function decreaseFontSize() {
   var p = document.getElementsByTagName('div');
   for(i=0;i<p.length;i++) {
      if(p[i].style.fontSize) {
         var s = parseInt(p[i].style.fontSize.replace("px",""));
      } else {
         var s = 12;
      }
      if(s!=min) {
         s = 10;
      }
      p[i].style.fontSize = s+"px"
   }   
   var p = document.getElementsByTagName('p');
   for(i=0;i<p.length;i++) {
      if(p[i].style.fontSize) {
         var s = parseInt(p[i].style.fontSize.replace("px",""));
      } else {
         var s = 12;
      }
      if(s!=min) {
         s = 10;
      }
      p[i].style.fontSize = s+"px"
   }   
   var p = document.getElementsByTagName('span');
   for(i=0;i<p.length;i++) {
      if(p[i].style.fontSize) {
         var s = parseInt(p[i].style.fontSize.replace("px",""));
      } else {
         var s = 12;
      }
      if(s!=min) {
         s = 10;
      }
      p[i].style.fontSize = s+"px"
   }
   var p = document.getElementsByTagName('input');
   for(i=0;i<p.length;i++) {
      if(p[i].style.fontSize) {
         var s = parseInt(p[i].style.fontSize.replace("px",""));
      } else {
         var s = 12;
      }
      if(s!=min) {
         s = 10;
      }
      p[i].style.fontSize = s+"px"
   }
   var p = document.getElementsByTagName('a');
   for(i=0;i<p.length;i++) {
      if(p[i].style.fontSize) {
         var s = parseInt(p[i].style.fontSize.replace("px",""));
      } else {
         var s = 12;
      }
      if(s!=min) {
         s = 10;
      }
      p[i].style.fontSize = s+"px"
   }
   var p = document.getElementsByTagName('font');
   for(i=0;i<p.length;i++) {
      if(p[i].style.fontSize) {
         var s = parseInt(p[i].style.fontSize.replace("px",""));
      } else {
         var s = 12;
      }
      if(s!=min) {
         s = 10;
      }
      p[i].style.fontSize = s+"px"
   }
}

function resetFontSize() {
   var p = document.getElementsByTagName('div');
   for(i=0;i<p.length;i++) {
      if(p[i].style.fontSize) {
         var s = parseInt(p[i].style.fontSize.replace("px",""));
      } else {
         var s = 12;
      }
      if(s!=max) {
         s = 12;
      }else{
	 s = 12;
      }
      p[i].style.fontSize = s+"px"
   }   
   var p = document.getElementsByTagName('p');
   for(i=0;i<p.length;i++) {
      if(p[i].style.fontSize) {
         var s = parseInt(p[i].style.fontSize.replace("px",""));
      } else {
         var s = 12;
      }
      if(s!=max) {
         s = 12;
      }else{
	 s = 12;
      }
      p[i].style.fontSize = s+"px"
   }   
   var p = document.getElementsByTagName('span');
   for(i=0;i<p.length;i++) {
      if(p[i].style.fontSize) {
         var s = parseInt(p[i].style.fontSize.replace("px",""));
      } else {
         var s = 12;
      }
      if(s!=max) {
         s = 12;
      }else{
	 s = 12;
      }
      p[i].style.fontSize = s+"px"
   }
   var p = document.getElementsByTagName('input');
   for(i=0;i<p.length;i++) {
      if(p[i].style.fontSize) {
         var s = parseInt(p[i].style.fontSize.replace("px",""));
      } else {
         var s = 12;
      }
      if(s!=max) {
         s = 12;
      }else{
	 s = 12;
      }
      p[i].style.fontSize = s+"px"
   }
   var p = document.getElementsByTagName('a');
   for(i=0;i<p.length;i++) {
      if(p[i].style.fontSize) {
         var s = parseInt(p[i].style.fontSize.replace("px",""));
      } else {
         var s = 12;
      }
      if(s!=max) {
         s = 12;
      }else{
	 s = 12;
      }
      p[i].style.fontSize = s+"px"
   }
   var p = document.getElementsByTagName('font');
   for(i=0;i<p.length;i++) {
      if(p[i].style.fontSize) {
         var s = parseInt(p[i].style.fontSize.replace("px",""));
      } else {
         var s = 12;
      }
      if(s!=max) {
         s = 12;
      }else{
	 s = 12;
      }
      p[i].style.fontSize = s+"px"
   }
}

//<a href="javascript:decreaseFontSize();">-</a> 
//<a href="javascript:increaseFontSize();">+</a>*/
var min=9;
var max=14;
function increaseFontSize() {
   var p = document.getElementsByTagName('p');
   for(i=0;i<p.length;i++) {
      if(p[i].style.fontSize) {
         var s = parseInt(p[i].style.fontSize.replace("px",""));
      } else {
         var s = 12;
      }
      if(s!=max) {
         s = 14;
      }
      p[i].style.fontSize = s+"px"
   }
   var p = document.getElementsByTagName('span');
   for(i=0;i<p.length;i++) {
      if(p[i].style.fontSize) {
         var s = parseInt(p[i].style.fontSize.replace("px",""));
      } else {
         var s = 12;
      }
      if(s!=max) {
         s = 14;
      }
      p[i].style.fontSize = s+"px"
   }
   var p = document.getElementsByTagName('input');
   for(i=0;i<p.length;i++) {
      if(p[i].style.fontSize) {
         var s = parseInt(p[i].style.fontSize.replace("px",""));
      } else {
         var s = 12;
      }
      if(s!=max) {
         s = 14;
      }
      p[i].style.fontSize = s+"px"
   }
   var p = document.getElementsByTagName('a');
   for(i=0;i<p.length;i++) {
      if(p[i].style.fontSize) {
         var s = parseInt(p[i].style.fontSize.replace("px",""));
      } else {
         var s = 12;
      }
      if(s!=max) {
         s = 14;
      }
      p[i].style.fontSize = s+"px"
   }
   var p = document.getElementsByTagName('font');
   for(i=0;i<p.length;i++) {
      if(p[i].style.fontSize) {
         var s = parseInt(p[i].style.fontSize.replace("px",""));
      } else {
         var s = 12;
      }
      if(s!=max) {
         s = 14;
      }
      p[i].style.fontSize = s+"px"
   }
}

function decreaseFontSize() {
   var p = document.getElementsByTagName('p');
   for(i=0;i<p.length;i++) {
      if(p[i].style.fontSize) {
         var s = parseInt(p[i].style.fontSize.replace("px",""));
      } else {
         var s = 12;
      }
      if(s!=min) {
         s = 9;
      }
      p[i].style.fontSize = s+"px"
   }   
   var p = document.getElementsByTagName('span');
   for(i=0;i<p.length;i++) {
      if(p[i].style.fontSize) {
         var s = parseInt(p[i].style.fontSize.replace("px",""));
      } else {
         var s = 12;
      }
      if(s!=min) {
         s = 9;
      }
      p[i].style.fontSize = s+"px"
   }
   var p = document.getElementsByTagName('input');
   for(i=0;i<p.length;i++) {
      if(p[i].style.fontSize) {
         var s = parseInt(p[i].style.fontSize.replace("px",""));
      } else {
         var s = 12;
      }
      if(s!=min) {
         s = 9;
      }
      p[i].style.fontSize = s+"px"
   }
   var p = document.getElementsByTagName('a');
   for(i=0;i<p.length;i++) {
      if(p[i].style.fontSize) {
         var s = parseInt(p[i].style.fontSize.replace("px",""));
      } else {
         var s = 12;
      }
      if(s!=min) {
         s = 9;
      }
      p[i].style.fontSize = s+"px"
   }
   var p = document.getElementsByTagName('font');
   for(i=0;i<p.length;i++) {
      if(p[i].style.fontSize) {
         var s = parseInt(p[i].style.fontSize.replace("px",""));
      } else {
         var s = 12;
      }
      if(s!=min) {
         s = 9;
      }
      p[i].style.fontSize = s+"px"
   }
}

function resetFontSize() {
   var p = document.getElementsByTagName('p');
   for(i=0;i<p.length;i++) {
      if(p[i].style.fontSize) {
         var s = parseInt(p[i].style.fontSize.replace("px",""));
      } else {
         var s = 12;
      }
      if(s!=max) {
         s = 12;
      }else{
	 s = 12;
      }
      p[i].style.fontSize = s+"px"
   }   
   var p = document.getElementsByTagName('span');
   for(i=0;i<p.length;i++) {
      if(p[i].style.fontSize) {
         var s = parseInt(p[i].style.fontSize.replace("px",""));
      } else {
         var s = 12;
      }
      if(s!=max) {
         s = 12;
      }else{
	 s = 12;
      }
      p[i].style.fontSize = s+"px"
   }
   var p = document.getElementsByTagName('input');
   for(i=0;i<p.length;i++) {
      if(p[i].style.fontSize) {
         var s = parseInt(p[i].style.fontSize.replace("px",""));
      } else {
         var s = 12;
      }
      if(s!=max) {
         s = 12;
      }else{
	 s = 12;
      }
      p[i].style.fontSize = s+"px"
   }
   var p = document.getElementsByTagName('a');
   for(i=0;i<p.length;i++) {
      if(p[i].style.fontSize) {
         var s = parseInt(p[i].style.fontSize.replace("px",""));
      } else {
         var s = 12;
      }
      if(s!=max) {
         s = 12;
      }else{
	 s = 12;
      }
      p[i].style.fontSize = s+"px"
   }
   var p = document.getElementsByTagName('font');
   for(i=0;i<p.length;i++) {
      if(p[i].style.fontSize) {
         var s = parseInt(p[i].style.fontSize.replace("px",""));
      } else {
         var s = 12;
      }
      if(s!=max) {
         s = 12;
      }else{
	 s = 12;
      }
      p[i].style.fontSize = s+"px"
   }
}

//<a href="javascript:decreaseFontSize();">-</a> 
//<a href="javascript:increaseFontSize();">+</a>
