/* DHTML Menu Script v1.0.5 Author: Alex Boyer Copyright: HPI Racing 2007 - 2008 Comments: Ok, this took me a really really long time to build and get to work right, so please don't nab it. =P Use of this code in any form is prohibited. /Comments */ var hasPanel = new Array(); function showSubMenu(num) { for(i=0;i'; loadimg = tblsearch[0].getElementsByTagName("a")[0]; loadimg.innerHTML = '' + kitName + ''; hasPanel[which] = 1; } } if(prevMenu != undefined && prevMenu != which) { if(showmenu[prevMenu] = false) { showHideSub(prevMenu); } } for(var i = 0; i < objThis.childNodes.length; i++) { if(objThis.childNodes.item(i).nodeName == "UL") { objThis.childNodes.item(i).style.display = "block"; } } } else if(showmenu[which] == false) { //***********************************************// // HIDING ITEMS //***********************************************// for(var i = 0; i < objThis.childNodes.length; i++) { if(objThis.childNodes.item(i).nodeName == "UL") { objThis.childNodes.item(i).style.display = "none"; return; } } } } function rolloverparent(which) { var menustart = document.getElementById('mainmenu'); var objThis = menustart.getElementsByTagName("LI")[which]; } function initialiseMenu() { var menustart = document.getElementById('mainmenu'); var objLICollection = menustart.getElementsByTagName("LI"); for(var i = 0; i < objLICollection.length; i++) { var objLI = objLICollection[i]; for(var j = 0; j < objLI.childNodes.length; j++) { hasPanel[i] = 0; objLI.onmouseout = new Function("hideSubMenu('" + i + "')"); objLI.onmouseover = new Function("showSubMenu('" + i + "')"); if(objLI.childNodes.item(j).nodeName == "UL") { for(var k = 0; k < objLI.childNodes.length; k++) { if(objLI.childNodes.item(k).nodeName == "A") { if(objLI.id != "leftthumbs") { if(objLI.childNodes.item(k).id != "whatsnew" && objLI.childNodes.item(k).className != "kittextlink") { objLI.childNodes.item(k).className = "hassubmenu"; } } } } } } } } function scrollContainer(which, dir) { var speed = 75; //Higher = faster var scrollThis = document.getElementById(which); if(dir == 'up') { scrollThis.scrollTop = scrollThis.scrollTop + speed; } else if(dir == 'down') { scrollThis.scrollTop = scrollThis.scrollTop - speed; } } function windowOpener(url,title,features) { controlWindow=window.open(url,title,features); } function popWindow(strName, intX, intY, strImgSrc) { posLeft = 0; posTop = 0; if (!window.popup) { popup = window.open('http://www.hpiracing.com/showimage.php?imgSrc=' + strImgSrc ,strName, 'width=' + intX + ', height=' + intY + ',noscrollbars, resizable=1') } else { popup.close(); popup = window.open('http://www.hpiracing.com/showimage.php?imgSrc=' + strImgSrc ,strName, 'width=' + intX + ', height=' + intY + ',noscrollbars, resizable=1') } popup.focus(); } function MM_swapImgRestore() { //v3.0 var i,x,a=document.MM_sr; for(i=0;a&&i0&&parent.frames.length) { d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p); } if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i'+alt+''); if (imageType == "swf"){ newWindow.document.write(''); newWindow.document.write(''); newWindow.document.write(''); newWindow.document.write(''); }else{ newWindow.document.write('\"'+alt+'\"'); } newWindow.document.write(''); newWindow.document.close(); newWindow.focus(); } function searchClickedSimple(form) { if (form.s.value=='') { alert("Please enter a term to search for."); return false; } return true; } function getPage(part) { var xmlhttp=false; /*@cc_on @*/ /*@if (@_jscript_version >= 5) // JScript gives us Conditional compilation, we can cope with old IE versions. // and security blocked creation of the objects. try { xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { try { xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); } catch (E) { xmlhttp = false; } } @end @*/ if (!xmlhttp && typeof XMLHttpRequest!='undefined') { xmlhttp = new XMLHttpRequest(); } var file2open = '/piw4.php?part=' + part; var urlvarcheck = document.location; xmlhttp.open("GET", file2open, true); xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4) { document.getElementById('response').innerHTML = xmlhttp.responseText; } } xmlhttp.send(null) } function confirmID() { if(document.signup.customID.value != "") { var iChars = "*|,\":<>[]{}`\';()@&$#%/-()! "; var string = document.signup.customID.value; var badUser = 0 for (var i = 0; i < string.length; i++) { if (iChars.indexOf(string.charAt(i)) != -1) { badUser = 1; } } if(badUser == 1) { alert("Special characters and spaces are not allowed in the username!"); return false; } else { if(confirm("Are you sure you want to change your Pit Stop profile address? This cannot be undone!")) { if(confirm("This is really your last chance to change your mind! Click ok if you're SURE this is the name you want.")) { return true; } else { return false; } } else { return false; } } } } function doFlashGallery(partNo) { document.write('\n'); document.write('\n'); document.write('\n'); document.write('\n'); document.write('\n'); } function positionit() { var theobject = document.all? document.all.surveyfloatlink : document.getElementById("surveyfloatlink"); if(navigator.appName == "Microsoft Internet Explorer") { var iebody = (document.compatMode && document.compatMode != "BackCompat")? document.documentElement : document.body } else { var iebody = document.body; } if (document.all||document.getElementById) theobject.style.visibility="hidden" var height = document.all ? iebody.clientHeight : window.innerHeight; var width = document.all ? iebody.clientWidth : window.innerWidth; var dsocleft = document.all ? iebody.scrollLeft : pageXOffset var dsoctop = document.all ? iebody.scrollTop : pageYOffset oldtop = parseFloat(theobject.style.top); if (oldtop) {} else { oldtop = 0; } newtop = (height + dsoctop) - 70; if (document.all||document.getElementById) { theobject.style.left = (620) + "px"; theobject.style.top = newtop + "px"; theobject.style.visibility = "visible" } } function positionit2(offset) { var theobject = document.all? document.all.surveyfloatlink : document.getElementById("surveyfloatlink"); if(navigator.appName == "Microsoft Internet Explorer") { var iebody = (document.compatMode && document.compatMode != "BackCompat")? document.documentElement : document.body } else { var iebody = document.body; } if (document.all||document.getElementById) theobject.style.visibility="hidden" var height = document.all ? iebody.clientHeight : window.innerHeight; var width = document.all ? iebody.clientWidth : window.innerWidth; var dsocleft = document.all ? iebody.scrollLeft : pageXOffset var dsoctop = document.all ? iebody.scrollTop : pageYOffset oldtop = parseFloat(theobject.style.top); if (oldtop) {} else { oldtop = 0; } newtop = (height + dsoctop) - 70; if (document.all||document.getElementById) { theobject.style.left = (620 + offset) + "px"; theobject.style.top = newtop + "px"; theobject.style.visibility = "visible" } }