//:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: //:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: //:: javascript functions //:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: //:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: var giMouseX var giMouseY //:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: //:: captureMouseMove //:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: function captureMouseMove(e) { } document.onmousemove = captureMouseMove; //:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: //:: popUp //:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: function popUp(sUrl , iWidth , iHeight , bScrollBars) { sPageName = "DFPopUp" window.open(sUrl , sPageName , "status=1,scrollbars=" + bScrollBars + ",width=" + iWidth + ",height=" + iHeight + ",resizable=yes"); } //:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: //:: flipImage //:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: function flipImage(sImageName , sFlipTo , sExtension) { document.images[sImageName].src = "images/" + sImageName + "_" + sFlipTo + "." + sExtension } //:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: //:: refreshPage //:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: function refreshPage() { document.location = document.location } //:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: //:: getStyleAttribute //:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: function getStyleAttribute(sID , sAttribute) { sCurrentTop = new String(eval("document." + sID + "." + sAttribute)) return sCurrentTop } //:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: //:: setStyleAttribute //:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: function setStyleAttribute(sID , sAttribute , sValue) { sStyleToSet = "document." + sID + "." + sAttribute + "='" + sValue + "'" eval(sStyleToSet) } //:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: //:: moveDiv //:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: function moveDiv(sID , sAttribute , iValue) { iCurrentPos = getStyleAttribute(sID , sAttribute) iCurrentPos = cPxToInt(iCurrentPos) sNextTopNumber = new String(iCurrentPos + iValue) sNextPos = sNextTopNumber + "px" setStyleAttribute(sID , sAttribute , sNextPos) } //:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: //:: cPxToInt //:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: function cPxToInt(sPx) { iInt = Number(sPx.replace(/px/gi,"")) return iInt } //:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: //:: getRandomNumber //:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: function getRandomNumber(iBeginNum , iEndNum) { iNumberToSend = iBeginNum - 1 while(iNumberToSend < iBeginNum || iNumberToSend > iEndNum) { iNumberToSend = iBeginNum + (Math.random() * iEndNum) } return Math.round(iNumberToSend) } //:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: //:: (decimal to hex functions) //:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: function cHex(i) { a2 = '' ihex = hexQuot(i); idiff = eval(i + '-(' + ihex + '*16)') a2 = itohex(idiff) + a2; while( ihex >= 16) { itmp = hexQuot(ihex); idiff = eval(ihex + '-(' + itmp + '*16)'); a2 = itohex(idiff) + a2; ihex = itmp; } a1 = itohex(ihex); return a1 + a2 ; } function hexQuot(i) { return Math.floor(eval(i +'/16')); } function itohex(i) { if(i == 0){aa = '0'} if(i == 1){aa = '1'} if(i == 2){aa = '2'} if(i == 3){aa = '3'} if(i == 4){aa = '4'} if(i == 5){aa = '5'} if(i == 6){aa = '6'} if(i == 7){aa = '7'} if(i == 8){aa = '8'} if(i == 9){aa = '9'} if(i == 10){aa = 'A'} if(i == 11){aa = 'B'} if(i == 12){aa = 'C'} if(i == 13){aa = 'D'} if(i == 14){aa = 'E'} if(i == 15){aa = 'F'} return aa } //:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: //:: (occ functions) //:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: // This is used to generate the dropdown boxes to display the OIC database sources...to be included in OIC forms. // function loadsubcat takes the following variables // 1. dropdown - the dropdown menu to be generated (subcategories in this case) // 2. maincat_selected - the value of the main category selected (e.g. "tv", "newspaper", "radio", "magazine", "internet") //arr_tv = new Array( //new Array("Please select subcategory", "zero"), //new Array("Bloomberg TV", "bloom"), //new Array("CNBC", "cnbc"), //new Array("Other", "otctv")); arr_888 = new Array( new Array("OptionsEducation.org", "oicoccweb")); arr_newspaper = new Array( new Array("Please select subcategory", "zero"), new Array("Barron's", "bamp"), new Array("Investor's Business Daily", "ibd"), new Array("Wall Street Journal", "wsj"), new Array("Other", "otnp")); //arr_radio = new Array( //new Array("Please select subcategory", "zero"), //new Array("Bloomberg Radio", "bmr"), //new Array("Jim Cramer Radio", "jmcr"), //new Array("WBBR", "wbbr"), //new Array("Other", "radio")); arr_magazine = new Array( new Array("Please select subcategory", "zero"), //new Array("Active Trader", "act"), //new Array("Futures Magazine", "futmag"), //new Array("Kiplinger's", "kiplin"), //new Array("Registered Rep", "regrep"), //new Array("SFO Magazine", "sfomag"), //new Array("Smart Money", "sm"), //new Array("Stocks & Commodities", "techanal"), new Array("Other", "otmag")); arr_internet = new Array( new Array("Please select subcategory", "zero"), new Array("OptionsEducation.org", "oicoccweb"), //new Array("AdAuthority/Media2", "admed"), new Array("AOL", "aol"), new Array("Barrons.com", "bcom"), //new Array("BarronsOnline", "bo"), new Array("BigCharts.com", "bigchart"), //new Array("BusinessWeek", "bw"), //new Array("CNN/Money", "cnnmon"), new Array("DowJones.com", "dowjones"), //new Array("DowJonesMarketWatch Newsletter", "mktnews"), //new Array("Forbes.com", "forcom"), //new Array("FreeOnline.com", "free"), //new Array("FuturesMag.com", "fmagcom"), //new Array("GKL/Precision Leads", "gkl"), //new Array("Google Search", "googser"), //new Array("Google", "google"), //new Array("INO.com", "ino"), new Array("investors.com", "ibdcom"), new Array("Investors Alley", "invalley"), //new Array("Investors Observer", "invobs"), //new Array("KCI Financial", "kci"), //new Array("iTunes (Podcast)", "itunes"), //new Array("Kiplinger.com", "kipcom"), new Array("MarketWatch", "mktwatc"), //new Array("MSN Search", "msnsearch"), //new Array("OnvestorGuide.com", "onvguide"), //new Array("Optionetics", "optnet"), //new Array("Overture Search", "over"), //new Array("Phillips", "phil"), new Array("Schaeffer.com", "scha"), new Array("SchaefferResearch.com", "schares"), //new Array("SchaefferResearchNewsletter", "schnews"), //new Array("SmartMoney.com", "smcom"), //new Array("TopGunsTrading.com", "tgt6"), //new Array("Traders.com", "traders"), new Array("Tribal Fusion", "tf"), new Array("WSJ.com", "wsjint"), new Array("Yahoo.com", "yahoo"), new Array("Search Engine", "sereng"), new Array("Exchange/Broker", "brkrexc"), //new Array("Yahoo Search", "yasearch"), //new Array("Zacks", "zack"), new Array("Other", "otint")); arr_mailing = new Array( new Array("Please select subcategory", "zero"), new Array("Email", "email"), new Array("Postcard", "postcd")); arr_default = new Array( new Array("No main category selected", "zero")); function loadsubcat(dropdown, maincat_selected) { var maincat_array; var i, j; switch (maincat_selected) { //case "tv" : maincat_array = arr_tv; break; case "888" : maincat_array = arr_888; break; case "newspaper" : maincat_array = arr_newspaper; break; //case "radio" : maincat_array = arr_radio; break; case "magazine" : maincat_array = arr_magazine; break; case "internet" : maincat_array = arr_internet; break; case "mailing" : maincat_array = arr_mailing; break; case "zero" : maincat_array = arr_default; break; default : maincat_array = arr_default; break; } // empty existing list dropdown.options.length = 0; j = 0; if (maincat_selected != null) { for (i = 0; i < maincat_array.length; i++) { dropdown.options[j] = new Option(maincat_array[i][0]); if (maincat_array[i][1] != null) { dropdown.options[j].value = maincat_array[i][1]; } j++; } } }