var xajaxRequestUri="http://ngwinnie.net/js/functions.js.php"; var xajaxDebug=false; var xajaxStatusMessages=false; var xajaxWaitCursor=true; var xajaxDefinedGet=0; var xajaxDefinedPost=1; var xajaxLoaded=false; function xajax_getcontents(){return xajax.call("getcontents", arguments, 1);} function xajax_exitindexpage(){return xajax.call("exitindexpage", arguments, 1);} var bgimg = "thebg.jpg"; var maincontenttablecolor = "#006699"; var catitems = new Array( new Array(0, "summary", "S", "ummary", true, false, 0, 3), new Array(1, "introduction", "i", "ntroduction", true, false, 0, 1), new Array(2, "my_details", "m", "y details", true, false, 0, 1), new Array(3, "portfolio", "p", "ortfolio", true, false, 0, 1), new Array(4, "leave_a_message", "l", "eave a message", true, false, 0, 0), new Array(5, "email_me", "e", "mail me", true, false, 0, 1) ); var selecteditem = 0; var timer = null; var divstep = 5; function newImage(arg) { if (document.images) { rslt = new Image(); rslt.src = arg; return rslt; } } function divScroll(divid, thedirection){ switch(thedirection){ case "up": case "u": document.getElementById(divid).scrollTop -= divstep; break; case "down": case "d": document.getElementById(divid).scrollTop += divstep; break; case "left": case "l": document.getElementById(divid).scrollLeft -= divstep; break; case "right": case "r": document.getElementById(divid).scrollLeft += divstep; break; } timer=setTimeout("divScroll('"+divid+"', '"+thedirection+"')",64) } function divScroll_stop(divid){ clearTimeout(timer); } function showmenu(){ thehtml = ''; for (i=0; i'+ '
'+catitems[i][2]+'
'+ '
'+ ''+ ''+ '
'; } document.getElementById('leftmenu').innerHTML = thehtml; fadeIn('menuc_'+catitems[selecteditem][1]+'',0,1,selecteditem, ''); } function exitindexpage(){ xajax_exitindexpage(-1); } function menumouseout(divid){ if (selecteditem!=divid){ if (catitems[divid][4]){ catitems[divid][4] = false; fadeIn('menuc_'+catitems[divid][1]+'',100,0,divid, ''); } catitems[divid][5] = true; } } function menumouseover(divid){ if (selecteditem!=divid){ catitems[divid][5] = false; if (catitems[divid][4]){ catitems[divid][4] = false; fadeIn('menuc_'+catitems[divid][1]+'',0,1,divid, ''); } } } function menuclick(divid){ if(selecteditem != divid){ catitems[selecteditem][4] = true; catitems[selecteditem][5] = false; catitems[selecteditem][6] = 0; catitems[divid][4] = true; catitems[divid][5] = false; fadeIn('menuc_'+catitems[selecteditem][1]+'',100,0,selecteditem, ''); selecteditem = divid; setvisible("btn_prev", false); if (catitems[divid][7]>1) setvisible("btn_next", true); else setvisible("btn_next", false); fadeOver('thetitle',100,0, 0, 'settitle('+divid+')'); str = "setcontent("+divid+")"; window.setTimeout('fadeOver("maincontents",100,0,0,str)', 200); } return false; } function navclick(isnext){ if (isnext){ if (catitems[selecteditem][6]0){ setvisible("btn_next", true); catitems[selecteditem][6]--; if (catitems[selecteditem][6]==0){ setvisible("btn_prev", false); } str = "setcontent(selecteditem)"; window.setTimeout('fadeOver("maincontents",100,0,0,str)', 200); } } return false; } function settitle(divid){ document.getElementById("thetitleheading").innerHTML = catitems[divid][2]; document.getElementById("thetitlecontent").innerHTML = catitems[divid][3]; } function setcontent(divid){ document.getElementById("maincontents").scrollTop = 0; xajax_getcontents(divid, catitems[divid][6]); } var fadeSpeed = 50; var stopSpeed = 5000; var notfading = true; function setOpacity(obj, opacity) { opacity = (opacity == 100)?99.999:opacity; // IE/Win obj.style.filter = "alpha(opacity:"+opacity+")"; // Safari<1.2, Konqueror obj.style.KHTMLOpacity = opacity/100; // Older Mozilla and Firefox obj.style.MozOpacity = opacity/100; // Safari 1.2, newer Firefox and Mozilla, CSS3 obj.style.opacity = opacity/100; } function fadeIn(innerId,opacity,isIn, theid, functionstr) { if (1){ nextfade = fadeSpeed; if (document.getElementById) { obj = document.getElementById(innerId); if (isIn==1){ if (opacity <= 100) { setOpacity(obj, opacity); opacity += 10; isIn = 1; window.setTimeout("fadeIn('"+innerId+"',"+opacity+","+isIn+","+theid+",'"+functionstr+"')", nextfade); }else{ opacity -= 10; isIn = 0; catitems[theid][4] = true; if (catitems[theid][5]){ catitems[theid][4] = false; catitems[theid][5] = false; window.setTimeout("fadeIn('"+innerId+"',"+opacity+","+isIn+","+theid+",'"+functionstr+"')", 1); } } }else{ if (opacity >= 0) { setOpacity(obj, opacity); opacity -= 10; isIn = 0; window.setTimeout("fadeIn('"+innerId+"',"+opacity+","+isIn+","+theid+",'"+functionstr+"')", nextfade); }else{ opacity += 10; isIn = 1; catitems[theid][4] = true; catitems[theid][5] = false; } } } } } function fadeOver(innerId,opacity,isIn, theid, functionstr) { if (1){ nextfade = fadeSpeed; if (document.getElementById) { obj = document.getElementById(innerId); if (isIn==1){ if (opacity <= 100) { setOpacity(obj, opacity); opacity += 10; isIn = 1; window.setTimeout("fadeOver('"+innerId+"',"+opacity+","+isIn+","+theid+",'"+functionstr+"')", nextfade); }else{ opacity -= 10; isIn = 0; } }else{ if (opacity >= 0) { setOpacity(obj, opacity); opacity -= 10; isIn = 0; window.setTimeout("fadeOver('"+innerId+"',"+opacity+","+isIn+","+theid+",'"+functionstr+"')", nextfade); }else{ opacity += 10; isIn = 1; eval(functionstr); window.setTimeout("fadeIn('"+innerId+"',"+opacity+","+isIn+","+theid+",'"+functionstr+"')", 1); } } } } } function loadlayout(){ html='
'; html+='
'; html+='
'; html+='
'; html+='NgWinnie.net'; html+='
'; html+=''; html+='
'; html+='
'; html+=''; html+='
'; html+='
'; html+='
'; html+='
'; html+='
'; html+='
'; html+='
'; html+=" "; html+=""; html+='
'; html+='
'; html+='
'; html+=''; html+=''; html+=''; html+=''; html+=''; html+=''; html+=''; html+=''; html+=''; html+='
'; html+='
'; html+='
'; html+='
'; html+="'; html+='

'; html+="'; html+='
'; html+='
'; html+=''; html+='
'; html+=''; html+=''; html+='
'; html+='
'; html+='
'; document.getElementById("pageBg").innerHTML=html; } function setvisible(theid, isvisible){ obj=document.getElementById(theid); if (isvisible){ obj.style.visibility = "visible"; obj.style.display = "block"; }else{ obj.style.visibility = "hidden"; obj.style.display = "none"; } } function startpage(){ if (document.images) { preloadimg = new Array( newImage("images/spacer.gif"), newImage("images/"+bgimg), newImage("images/menubtn.gif"), newImage("images/titlebtn.gif"), newImage("images/btn_next.gif"), newImage("images/btn_next_o.gif"), newImage("images/btn_prev.gif"), newImage("images/btn_prev_o.gif") ); } loadlayout(); showmenu(); settitle(0); xajax_getcontents(0,0); setvisible("btn_prev", false); if (catitems[0][7]>1) setvisible("btn_next", true); else setvisible("btn_next", false); }