
var COOKIENAME = "KSKIDS";

// Sound on Mouseover javascript supplied by http://www.hypergurl.com

/*var aySound = new Array();
// PLACE YOUR SOUND FILES BELOW
aySound[0] = "../sound/hand4.au";
aySound[1] = "../sound/train2.wav";

// Don't alter anything below this line
IE = (navigator.appVersion.indexOf("MSIE")!=-1 && document.all)? 1:0;
NS = (navigator.appName=="Netscape" && navigator.plugins["LiveAudio"])? 1:0;
ver4 = IE||NS? 1:0;
onload=auPreload;

//if (!IE) alert('Please use Microsoft Internet Explorer version 5.0 or higher to browse this website.');

function auPreload() {
if (!ver4) return;
if (NS) auEmb = new Layer(0,window);
else {
Str = "<DIV ID='auEmb' STYLE='position:absolute;'></DIV>";
document.body.insertAdjacentHTML("BeforeEnd",Str);
}
var Str = '';
for (i=0;i<aySound.length;i++)
Str += "<EMBED SRC='"+aySound[i]+"' AUTOSTART='FALSE' HIDDEN='TRUE'>"
if (IE) auEmb.innerHTML = Str;
else {
auEmb.document.open();
auEmb.document.write(Str);
auEmb.document.close();
}
auCon = IE? document.all.soundfiles:auEmb;
auCon.control = auCtrl;
}
function auCtrl(whSound,play) {
if (IE) this.src = play? aySound[whSound]:'';
else eval("this.document.embeds[whSound]." + (play? "play()":"stop()"))
}
function playSound(whSound) { if (window.auCon) auCon.control(whSound,true); }
function stopSound(whSound) { if (window.auCon) auCon.control(whSound,false); }*/

function showHideLayer(layer, action) {
	var vis = document.all[layer].style;
	(action == "Y") ? vis.visibility = "visible" : vis.visibility = "hidden";
}

// Generate Down Menu
function genMenu(_cell, _name, _topMargin, _leftMargin, _width) {
	document.write('<div id="menu_' + _name + '" style="position:absolute; top:' + _topMargin + 'px; z-index:2; visibility:hidden;" onMouseOver="chgIcon(' + _name + ',1); showHideLayer(\'menu_' + _name + '\',\'Y\');" onMouseOut="chgIcon(' + _name + ',0); showHideLayer(\'menu_' + _name + '\',\'N\');">\n');
	document.write('<table cellpadding=0 cellspacing=0 border=0><tr><td><img src="../image/common/pixel.gif" width=' + _leftMargin + ' height=1></td><td>\n');
	document.write('<table width=' + _width + ' cellpadding=0 cellspacing=0 border=0>\n');
	var temp = '';
	for (i = 0; i < _cell.length; i++) {
		if (i == 0 && _name == '3') temp = ' target="_blank"';
		document.write('<tr><td onMouseOver="this.style.backgroundColor=\'#DE4A9D\';" onMouseOut="this.style.backgroundColor=\'#7ED974\';" class=bg_green2 nowrap>&nbsp;<a href="' + _cell[i].url + '" class=menu' + temp + '>' + _cell[i].name + '</a></td></tr>\n');
	}
	document.write('</table>\n');
	document.write('</td></tr></table>\n');
	document.write('</div>\n');
}

// Generate Shopping Cart button for Special Offer
function genCartButton(_product_id, _x, _y) {
	var browser_info = navigator.appVersion;
	if (browser_info.indexOf('Windows') == -1) _y = eval(_y) - 83;
	//alert('appCodeName = ' + navigator.appCodeName + ' / appVersion = ' + navigator.appVersion);
	document.write('<div id="' + _product_id + '" style="position:absolute; top:' + _y + 'px; left:' + _x + 'px; z-index:2;">\n');
	document.write('<table cellpadding=0 cellspacing=0 border=0><tr>\n');
	document.write('<td><script language=Javascript>MM_checkbox(\'' + _product_id + '\')</script></td>\n');
	document.write('<td>&nbsp;</td><td><a href="javascript:clickCheckbox(\'' + _product_id + '\');"><img src="../image/ico_cart.gif" border=0></a></td>\n');
	document.write('</tr></table>\n');
	document.write('</div>\n');
}

// Pull Down Menu Object
function cellObject(_name, _url) {
	this.name = _name;
	this.url = _url;
}


// Generate Pull Down Menu - genMenu(cell_array,'layer_name',top_margin,left_margin,layer_width);
// About Us
var cell = new Array();
cell[0] = new cellObject("Our Mission", "KksStaticPage.php?page_id=1");
cell[1] = new cellObject("Awards", "KksStaticPage.php?page_id=3");
genMenu(cell,'1',83,0,90);

// Our Product
var cell = new Array();
cell[0] = new cellObject("Product Gallery", "KksStaticPage.php?page_id=4");
cell[1] = new cellObject("Movie Gallery", "KksStaticPage.php?page_id=18");
genMenu(cell,'2',83,103,110);

// Online Shopping
var cell = new Array();
//cell[0] = new cellObject("Special Offer", "KksStaticPage.php?page_id=14");
//cell[1] = new cellObject("Hot Items", "KksShoppingList.php?shopping_catg_id=2");
cell[0] = new cellObject("Shopping Mall", "KksProductList.php?mode=shopping");
//cell[2] = new cellObject("Shopping Mall", "KksShoppingList.php?shopping_catg_id=0");
genMenu(cell,'3',83,538,110);

// Distributors
var cell = new Array();
cell[0] = new cellObject("Distributor List", "KksStaticPage.php?page_id=5");
cell[1] = new cellObject("Distributor Club", "KksStaticPage.php?page_id=8");
genMenu(cell,'4',83,200,110);

// Developmental Stages
var cell = new Array();
cell[0] = new cellObject("0 month +", "KksStaticPage.php?page_id=6&tag=1");
cell[1] = new cellObject("6 month +", "KksStaticPage.php?page_id=6&tag=2");
cell[2] = new cellObject("12 month +", "KksStaticPage.php?page_id=6&tag=3");
cell[3] = new cellObject("24 month +", "KksStaticPage.php?page_id=6&tag=4");
genMenu(cell,'5',83,296,110);

// Download
var cell = new Array();
cell[0] = new cellObject("Wallpaper", "KksStaticPage.php?page_id=7&tag=1");
cell[1] = new cellObject("E-Card", "KksStaticPage.php?page_id=7&tag=2");
genMenu(cell,'6',83,452,110);
