var isMinNS4 = 1; //(navigator.appName.indexOf("Netscape") >= 0 && parseFloat(navigator.appVersion) >= 4) ? 1 : 0; var isMinNS5 = 1; //(navigator.appName.indexOf("Netscape") >= 0 && parseFloat(navigator.appVersion) >= 5) ? 1 : 0; var isMinIE4 = 1; //(document.all) ? 1 : 0; var isMinIE5 = 1; //(isMinIE4 && navigator.appVersion.indexOf("5.") >= 0) ? 1 : 0; // Top Main menu creation function function createMenu(menulinks,menuitems,style1,style2,enabledm) { var stringId = ""; if ((isMinIE4) || (isMinNS5)) { var menu = ""; for (counter in menulinks) { if (enabledm == true) { stringId = ""; if (dm_enable[counter] == true) stringId = "id=menulink"+counter; menu += "" } else { menu += "" } } menu += "
 "+menuitems[counter]+"  "+menuitems[counter]+" 
"; } // print_string(menu); return menu; } function print_string(menu1) { var menu2 = ""; for ( var i=0; i <= menu1.length ; i++ ) { if (menu1.substring (i, i+1) == "<") menu2 += "<"; else menu2 += menu1.substring (i,i+1); } menu2 += "



"; document.write (menu2); } menulinks = new Array ("index.php","products/apik2007.php","downloads/index.php","buynow/index.php","support/index.php","aboutus/index.php"); menuitems = new Array ("Home","Products","Download","Order","Support","Ablazesoft company"); dm_enable = new Array ("false","true","true","true","true","true"); DropMenus = new Array(); dropmenuitems = Array("Private InfoKeeper 2007","Private InfoKeeper","Products comparision","Version history","Free online password generator","Screen Shots"); dropmenulinks = Array("products/apik2007.php","products/index.php","products/prod_comp_table.php","history/index.php","pass_gen/index.php","ss/index.php"); DropMenus[1] = BuildDropMenu(dropmenuitems,dropmenulinks); dropmenuitems = Array("Our products","Mozilla FireFox plugin"); dropmenulinks = Array("downloads/index.php","products/ff_setup.php"); DropMenus[2] = BuildDropMenu(dropmenuitems,dropmenulinks); dropmenuitems = Array("Purchase our products","Resellers / Partners"); dropmenulinks = Array("buynow/index.php","buynow/resell.php"); DropMenus[3] = BuildDropMenu(dropmenuitems,dropmenulinks); dropmenuitems = Array("F.A.Q.","Online manual","Localization","Test Page","Report broken link","Support"); dropmenulinks = Array("faq/index.php","manual/index.php","localization/index.php","testpage/index.php","linkreport/index.php","support/index.php"); DropMenus[4] = BuildDropMenu(dropmenuitems,dropmenulinks); dropmenuitems = Array("Awards","About Us","Privacy Policy"); dropmenulinks = Array("awards/index.php","aboutus/index.php","privacy/index.php"); DropMenus[5] = BuildDropMenu(dropmenuitems,dropmenulinks); var menuheader = createMenu(menulinks,menuitems,"clsTopMenuNorm","clsMenuTopLink",true); var flag = 1; //isMinIE4; var eOpenMenu = null; var timerId = 0; var eSrcOpen = null; //if ( flag ) { document.onmouseover = mouseover; document.onmouseout = mouseout; document.onclick = onclick; //} function OpenMenu(eSrc,eMenu) { var eSrcCoordinate = eSrc; var x = 0; var y = 0; while (eSrcCoordinate) { // document.forms[0].test.value += " Node="+eSrcCoordinate.nodeName+" ID="+eSrcCoordinate.id+" x="+eSrcCoordinate.offsetLeft+" y="+eSrcCoordinate.offsetTop+"\n" x += eSrcCoordinate.offsetLeft; y += eSrcCoordinate.offsetTop; eSrcCoordinate = eSrcCoordinate.offsetParent } if (navigator.userAgent.indexOf("Mac") != -1 && typeof document.body.leftMargin != "undefined") { x += document.body.leftMargin; y += document.body.topMargin; } // document.forms[0].test.value += " leftMargin="+document.body.leftMargin+" topMargin="+document.body.topMargin+"\n"+"Total x="+x+" y="+y+"\n"; eMenu.style.top = y +22+ "px"; eMenu.style.left = x + "px"; eMenu.style.visibility = "visible"; eOpenMenu = eMenu; eSrcOpen = eSrc; eSrcOpen.className = "clsTopMenuOver"; } var IdBackup; var MenuSrc; MenuSrc = null; function CloseMenu(eMenu) { MenuSrc = null; eMenu.style.visibility = "hidden"; eOpenMenu = null; eSrcOpen.style.color = ""; eSrcOpen.className = "clsTopMenuNorm"; MenuSrc = document.getElementById(IdBackup); //window.alert(IdBackup); MenuSrc.style.color = "ffffff"; MenuSrc = null; } var classNameBackup; function mouseover(evt) { evt = (evt) ? evt : (window.event) ? window.event : ""; if (evt) { var eSrc = (evt.target) ? evt.target : evt.srcElement; classNameBackup = "clsTopMenuNorm"; if (eSrc.className == "clsDMLink") //if mouseover src obj is link in dm we go to level up -> eSrc = eSrc.parentNode; if (eSrc.className != "clsDMnormal" && eSrc.className != "dmTitles") // If not dmTitle and not dmnormal { if (eSrc.className == "clsMenuTopLink") { if (eSrc.id != "") { eSrc.style.color = "ffffff"; IdBackup = eSrc.id; } eSrc = eSrc.parentNode; } if (eSrc.className == "clsTopMenuNorm") { var eMenu = document.getElementById(eSrc.id.replace("tdMenuBarItem", "divMenu"));//we get right drop menu object by changing id name if (eOpenMenu && eOpenMenu != eMenu) //if we call new drop menu we need to close already opened drop menu CloseMenu(eOpenMenu); if (eMenu) timerId = window.setTimeout('OpenMenu(' + eSrc.id + ',' + eMenu.id + ')', 100);//drop menu open delay else eSrc.className = "clsTopMenuOver"; } else if (eOpenMenu) if (!f_parent(eSrc)) CloseMenu(eOpenMenu); } else if (eSrc.className == "clsDMnormal") eSrc.className = "clsDMover" return true; } } function f_parent(Obj1) //Function check does src obj contains in main menu { var result = new Boolean; result = false; while ((Obj1.parentNode.nodeName != "HTML") && (Obj1.nodeName != "HTML")) { if (Obj1.id == "divMenuBar") { result = true; break; } Obj1 = Obj1.parentNode; } return result; } function mouseout(evt) { window.clearTimeout(timerId); timerId = 0; evt = (evt) ? evt : (window.event) ? window.event : ""; if (evt) { var eSrc = (evt.target) ? evt.target : evt.srcElement; if (eOpenMenu) { if (eSrcOpen) { eSrcOpen.style.color = "#FFFFFF";} if (eSrc.className == "clsDMLink") eSrc = eSrc.parentNode; if (eSrc.className == "clsDMover") eSrc.className = "clsDMnormal" } else { eSrc.style.color = "" if (eSrc.className == "clsMenuTopLink") eSrc = eSrc.parentNode; if (eSrc.className == "clsTopMenuOver") { eSrc.className = classNameBackup; } } } } function onclick(evt) { var link = ""; evt = (evt) ? evt : (window.event) ? window.event : ""; if (evt) { var eSrc = (evt.target) ? evt.target : evt.srcElement; if ((eSrc.className == "clsDMover") || (eSrc.className == "clsTopMenuOver")) { i=0; while (eSrc.childNodes[i]) { if (eSrc.childNodes[i].nodeName == "A") { link = eSrc.childNodes[i].href; location.href = link; } i++; } } } } function BuildDropMenu(menuitems,menulinks) { var menu = "
"; var menu1 = ""; for (counter in menuitems) { menu += ""; } menu += "
"; //print_string(menu); return menu; } function drawmenus() { var str = ''; var str1 =''; if ( flag ) { for (counter in DropMenus) { if (DropMenus[counter] != "") { str += ''; } } document.write(str); // print_string(str) } } var timerID = 0; function Validate(form_name, err_msg_num) { var err_msg = new Array(); err_msg [0] = "You need enter both Your full name and valid email address."; err_msg [1] = "You need to fillout Login and Password field in order to test Private InfoKeeper 2007."; //var msg = "You need enter both Your full name and valid email address."; var lname = document.forms[form_name].lname.value; var fname = document.forms[form_name].fname.value; var email = document.forms[form_name].email.value; // check for any space characters that may be input if (lname == "" || lname == null || email == "" || email == null || fname == "" || fname == null) { alert (err_msg[err_msg_num]); return false; } return checkEmail(email); } function checkEmail(email_str) { var filter = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/; if (filter.test(email_str)) return true; alert('You have typed an invalid e-mail address\r\nPlease, check it and type again.'); return false; } function link_menu (path) { location.href = path;}