/*	Created by: Arnel C. Navarra for ISP Bonanza
	Date: 12/08/2001
	Updated: 10/02/2003
	eMail: webguru@ispbonanza.com.ph
*/

function print(text) {
	document.write(text);
}

function setMenu() {
nApp = navigator.appName;
	if(nApp == "Microsoft Internet Explorer") {
		aboutusMenu(290,86);
		dealershipMenu(350,78);
		dealersMenu(414,68);
		accessoriesMenu(478,60);
		helpMenu(542,53);
		contactMenu(400,196);
		whatUsage(590,24);
	}
}

function putNotice() {

}

function putLoading() {
bn = navigator.appName;
bv = parseInt(navigator.appVersion);
strLoading = '<div id="loading" style="position:absolute; width:100%; height:100%; left:0px; top:0px; z-index:100 "><table width="100%" height="100%" bgcolor="#ffffff" border=0><tr><td align="center" vAlign="middle" width="100%" height="100%"><img src="images/anim/loadingpage.gif" width="300" height="47" alt="Loading Page ..." border="0"></td></tr></table></div>';

	if(bn=="Netscape") {
		if(bv<5) {
			document.write(strLoading);
		}
	} else {
		document.write(strLoading);
	}
}

function putSearchEngine() {
strSe = '<table width=400 border=0 cellpadding=0 cellspacing=0><tr><td colspan=3><img src="images/se_box_01.gif" width=400 height=21></td></tr><tr><td><img src="images/se_box_02.gif" width=12 height=47></td><td bgcolor="#ffffff" align="center" vAlign="middle"><form name="searchForm" onSubmit="return searchItem(\'searchForm\')"><input name="txtItem" type="text" size="28">&nbsp;&nbsp;<select name="txtSearchEngine" size="1"><option selected>Yahoo<option>Yehey<option>Alta Vista<option>Lycos<option>Excite<option>Google<option>WebCrawler<option>AOL Search</select><input type="image" name="submit" src="images/index1_pink_button.gif" align="absmiddle" alt="Go! Search!" border=0></form></td><td align="right"><img src="images/se_box_04.gif" width=15 height=47></td></tr><tr><td colspan=3><img src="images/se_box_05.gif" width=400 height=16></td></tr></table>';
document.write(strSe);
}

function doOnLoad() {
//window.focus();
//hideLayer("loading");
//updateTime;
}

function changeBgColor(tableCell,bgCol) {
	tableCell.style.backgroundColor = bgCol;
}

function putHeading() {
document.write('<table width=775 border=0 cellpadding=0 cellspacing=0><tr>');
document.write('<td><img src="images/topbackground_01.gif" width=276 height=101></td>');
document.write('<td><img src="images/topbackground_02.gif" width=308 height=101 usemap="#main" border=0></td>');
document.write('<td><img src="images/topbackground_03.gif" width=191 height=101 usemap="#topmenu" border=0></td>');
document.write('</tr></table>');
}

function mapTopMenu() {
document.write('<map name="topmenu">');
	if(navigator.appName == "Netscape") {
		document.write('<area shape="rect" coords="20,8,84,25" href="http://www1.tri-isys.com/ispbonanza/" target="_blank" alt="ISP Bonanza Check Usage">');
	} else {
		document.write('<area shape="rect" coords="20,8,84,25" href="javascript:void(0)" onMouseOver=hideAllMenuBut("menuUsage")>');
	}	
document.write('<area shape="rect" coords="102,8,139,20" href="http://www.ispbonanza.com.ph/goto.php3?page=webmail2/" alt="Free WebMail">');
document.write('<area shape="rect" coords="154,8,186,20" href="http://www.ispbonanza.com.ph/" target="_self" alt="Home">');
document.write('</map>');
}

function hideLayer(layerName) {
	if(navigator.appName == "Netscape") {
		document.layers[layerName].visibility = "hidden";
	} else {
		document.all[layerName].style.visibility = "hidden";
	}
}

function showLayer(layerName) {
	if(navigator.appName == "Netscape") {
		document.layers[layerName].visibility = "visible";
	} else {
		document.all[layerName].style.visibility = "visible";
	}
}


function hideAllMenuBut(thisMenu) {
	idName = new Array();
	idName[0] = "menuAbout";
	idName[1] = "menuDealership";
	idName[2] = "menuDealers";
	idName[3] = "menuAccessories";
	idName[4] = "menuHelp";
	idName[5] = "menuUsage";
	//hides all menu:
	for(i=0;i<=5;i++) {
		hideLayer(idName[i]);
	}
	//shows the current menu:
	showLayer(thisMenu);
}

function refreshWindow() {
bn = navigator.appName;
bv = parseInt(navigator.appVersion);
	if(bn=="Netscape") {
		if(bv<5) {
			window.location.reload();
		}
	} 
}

function popGame(game,x,y,opt) {
window.open(game, target="_blank", "resizable=no,width="+x+",height="+y+",left=100px,top=50px,scrollbars="+opt+"");
}

function validateMe() {
	maxFormLength = document.forms[0].elements.length;
	
	for(i=0;i<=maxFormLength-3;i++) {
		field = document.forms[0].elements[i];
		strVal = field.value;
		fn = field.name;
		c = strVal.length;

		//check if blank:
		if (strVal == "") {
			alert("Important field. Do not leave blank. Thank you.");
			field.focus(); return false;
		}	
	}
	

}


//bottom menu & copyright (03/07/2002)
function putBottomMenu() {
print('<p class="body2"><b>');
print('<a class="link1" href="http://www.ispbonanza.com.ph/goto.php3?page=aboutus.html" target="_self">About Us</a>  | ');
print('<a class="link1" href="http://www.ispbonanza.com.ph/goto.php3?page=dealership.html" target="_self">Dealership</a> | ');
print('<a class="link1" href="http://www.ispbonanza.com.ph/goto.php3?page=dealers.html" target="_self">Where To Buy</a> | ');
print('<a class="link1" href="http://www.ispbonanza.com.ph/goto.php3?page=accessories.html" target="_self">Accessories</a> | ');
print('<a class="link1" href="http://www.ispbonanza.com.ph/goto.php3?page=help.html" target="_self">Help</a> | ');
print('<a class="link1" href="http://www.ispbonanza.com.ph/" target="_self">Home</a></b><br>');
print('<a href="javascript:boxPayPlus()">Use your ATM Card to Purchase ISP Bonanza - Learn More!</a> | ');
print('<a href="http://www.tri-isys.com/products-services/advertising/" target="_blank">Advertise With Us!</a>');
print('<p><font class="body2">Copyright (c) 2001 - 2002, Inter-Island Information Systems, Inc. All rights reserved. | <a href="http://www.ispbonanza.com.ph/goto.php3?page=terms.html">Terms &amp; Conditions</a></font><br><br>');

}

//web directory (06/29/2002)
function putWebDir() {
print('	<table width=400 border=0 cellpadding=0 cellspacing=0><tr><td><img src="images/wd_box_01.gif" width=400 height=22></td></tr><tr><td><table bgcolor="#ffffff" width=100% border=0 cellpadding=0 cellspacing=0><tr><td width="15" valign="top"><img src="images/wd_box_02.gif" width=15 height=190></td><td width="370" bgcolor="#ffffff" class="textGray11" valign="top"><table bgcolor="#ffffff" width=100% border=0 cellpadding=0 cellspacing=0>');
print('	<tr height="30" valign="top"><td class="textGray10" width="33.33%"><a href="http://dmoz.org/Arts/" target="_blank"><b>Arts</b><br>Movies, Music...</a></td><td class="textGray10" width="33.33%"><a href="http://dmoz.org/Business/" target="_blank"><b>Business</b><br>Jobs, Industries...</a></td><td class="textGray10"><a href="http://dmoz.org/Computers/" target="_blank"><b>Computers</b><br>Internet, Software...</a></td></tr>');
print('	<tr height="30" valign="top"><td class="textGray10"><a href="http://dmoz.org/Games/" target="_blank"><b>Games</b><br>Video, RPGs...</a></td><td class="textGray10"><a href="http://dmoz.org/Health/" target="_blank"><b>Health</b><br>Fitness, Medicine...</a></td><td class="textGray10"><a href="http://dmoz.org/Home/" target="_blank"><b>Home</b><br>Family, Cooking...</a></td></tr>');
print('	<tr height="30" valign="top"><td class="textGray10"><a href="http://dmoz.org/Kids_and_Teens/" target="_blank"><b>Kids &amp; Teens</b><br>Arts, School...</a></td><td class="textGray10"><a href="http://dmoz.org/News/" target="_blank"><b>News</b><br>Media, Weather...</a></td><td class="textGray10"><a href="http://dmoz.org/Recreation/" target="_blank"><b>Recreation</b><br>Travel, Food...</a></td></tr>');
print('	<tr height="30" valign="top"><td class="textGray10"><a href="http://dmoz.org/Reference/" target="_blank"><b>Reference</b><br>Maps, Education...</a></td><td class="textGray10"><a href="http://dmoz.org/Regional/" target="_blank"><b>Regional</b><br>US, Asia...</a></td><td class="textGray10"><a href="http://dmoz.org/Science/" target="_blank"><b>Science</b><br>Biology, Physics...</a></td></tr>');
print('	<tr height="30" valign="top"><td class="textGray10"><a href="http://dmoz.org/Shopping/" target="_blank"><b>Shopping</b><br>Autos, Clothing...</a></td><td class="textGray10"><a href="http://dmoz.org/Society/" target="_blank"><b>Society</b><br>People, Religion...</a></td><td class="textGray10"><a href="http://dmoz.org/Sports/" target="_blank"><b>Sports</b>Basketball, Soccer...</a></td></tr>');
print('	<tr height="30" valign="top"><td class="textGray10" colspan=3><a href="http://dmoz.org/World/" target="_blank"><b>World</b><br>Deutsch, Espaņol, Filipino, Francais, Italiano, Japanese...</a></td></tr>');
print('	</table></td><td width="15" valign="top"><img src="images/wd_box_04.gif" width=15 height=190></td></tr></table></td></tr><tr><td><img src="images/wd_box_05.gif" width=400 height=17></td></tr></table>');
}

//for card entry (07/16/2002)
function changeEntry(e,n,m,en) {
document.images["entry"].src = "images/entries/mar2003/"+e+".jpg";
document.forms["dEntry"].contestant.value = n;
document.forms["dEntry"].email.value = m;
document.forms["dEntry"].entryno.value = en;
}

//for pages under construction:
function noLinkNotice() {
	alert("Sorry. The link is still under development. Please try again later. Thank you.");
}

//for message board icons (11/06/2002):
function changeMsg() {
	msgIcon = new Array();
	msgIcon[0] = "images/msgboard_1.gif"
	msgIcon[1] = "images/msgboard_2.gif";
	msgIcon[2] = "images/msgboard_3.gif";
	msgIcon[3] = "images/msgboard_4.gif";
	msgIcon[4] = "images/msgboard_5.gif";
	m = Math.round(4*Math.random());
	print(msgIcon[m]);
}

//refresh messageboard (11/07/2002):
function refreshMsgBoard() {
	window.location.reload();
}

//for inner ads (12/04/2002):
function innerAds() {
	/*
	print('<br><a name="rxpinoy">&nbsp;</a>');
	print('<table width="100%" border=0 bgcolor="#336699" cellpadding="1" cellspacing="0"><tr><td>');
	print('<table bgcolor="#ffffcc" width="100%" border=0 cellpadding="10" cellspacing=0><tr>');
	print('<td align="center"><a href="http://www.rxpinoy.com/" target="_blank"><img src="images/ad_rxpinoy.gif" alt="RxPinoy.com" border=0></a></td>');
	print('<td class="textGray12"><B class="textRed14">NOW ON SALE!!!</B> <br><b class="textDarkBlue12">The RxPinoy Health Directory</b> <br>The ultimate tool for finding doctors, dentists, drugstores hospitals, support groups, and many more. <a href="http://www.rxpinoy.com/" target="_blank">Click here for details.</a></td>');
	print('</tr></table>');
	print('</td></tr></table><br>');
	
	//notice to the public (wesly) - 02/12/2003
	
	print('<table width="100%" border="0" cellpadding="1" cellspacing="0" bgcolor="#336699"><tr><td>');
	print('<table width="100%" border="0" cellpadding="5" cellspacing="0" bgcolor="#ffffcc">');
	print('<tr><td><img src="images/isp_wesley.jpg" border=0></td>');
	print('<td class="textGray11"><b class="textBlue18">NOTICE TO THE PUBLIC</b><br>This is to inform you that MR. WESLY A. FERNANDEZ and MS. MELVA BELANGUIGE are no longer connected with Inter-Island Information Systems, Inc. (Tri-Isys Internet), owner of the popular brand - ISP Bonanza Prepaid Internet Card. Any transaction entered into by Mr. Fernandez and Ms. Belanguige on behalf of Tri-Isys Internet will no longer be honored and is considered null and void.</td>');
	print('</tr></table></td></tr></table>');
	*/
}

//payplus popup (12/19/2002)
function boxPayPlus() {
	window.open("http://www.yehey.com/payplus/popup4yehey.htm", target="payplus", "scrollbars=yes,resizable=no,width=330,height=500,left=100px,top=50px");
	void(0);
}
