var passError = 0; var conError = 0; var counter = 0; var DomainURL = "http://www.gomezpeerzone.com/wp-content/themes/peerzone/"; function stateset(country,state){ this.country=country; this.state=state; } var states_ref = new Array(); states_ref[0] = new stateset('US','Alabama'); states_ref[1] = new stateset('US','Alaska'); states_ref[2] = new stateset('US','Arizona'); states_ref[3] = new stateset('US','Arkansas'); states_ref[4] = new stateset('US','California'); states_ref[5] = new stateset('US','Colorado'); states_ref[6] = new stateset('US','Connecticut'); states_ref[7] = new stateset('US','District of Columbia'); states_ref[8] = new stateset('US','Delaware'); states_ref[9] = new stateset('US','Florida'); states_ref[10] = new stateset('US','Georgia'); states_ref[11] = new stateset('US','Hawaii'); states_ref[12] = new stateset('US','Idaho'); states_ref[13] = new stateset('US','Illinois'); states_ref[14] = new stateset('US','Indiana'); states_ref[15] = new stateset('US','Iowa'); states_ref[16] = new stateset('US','Kansas'); states_ref[17] = new stateset('US','Kentucky'); states_ref[18] = new stateset('US','Louisiana'); states_ref[19] = new stateset('US','Maine'); states_ref[20] = new stateset('US','Maryland'); states_ref[21] = new stateset('US','Massachusetts'); states_ref[22] = new stateset('US','Michigan'); states_ref[23] = new stateset('US','Minnesota'); states_ref[24] = new stateset('US','Mississippi'); states_ref[25] = new stateset('US','Missouri'); states_ref[26] = new stateset('US','Montana'); states_ref[27] = new stateset('US','Nebraska'); states_ref[28] = new stateset('US','Nevada'); states_ref[29] = new stateset('US','New Hampshire'); states_ref[30] = new stateset('US','New Jersey'); states_ref[31] = new stateset('US','New Mexico'); states_ref[32] = new stateset('US','New York'); states_ref[33] = new stateset('US','North Carolina'); states_ref[34] = new stateset('US','North Dakota'); states_ref[35] = new stateset('US','Ohio'); states_ref[36] = new stateset('US','Oklahoma'); states_ref[37] = new stateset('US','Oregon'); states_ref[38] = new stateset('US','Pennsylvania'); states_ref[39] = new stateset('US','Rhode Island'); states_ref[40] = new stateset('US','South Carolina'); states_ref[41] = new stateset('US','South Dakota'); states_ref[42] = new stateset('US','Tennessee'); states_ref[43] = new stateset('US','Texas'); states_ref[44] = new stateset('US','Utah'); states_ref[45] = new stateset('US','Vermont'); states_ref[46] = new stateset('US','Virginia'); states_ref[47] = new stateset('US','Washington'); states_ref[48] = new stateset('US','West Virginia'); states_ref[49] = new stateset('US','Wisconsin'); states_ref[50] = new stateset('US','Wyoming'); states_ref[51] = new stateset('CA','Alberta'); states_ref[52] = new stateset('CA','British Columbia'); states_ref[53] = new stateset('CA','Manitoba'); states_ref[54] = new stateset('CA','New Brunswick'); states_ref[55] = new stateset('CA','Newfoundland and Labrador'); states_ref[56] = new stateset('CA','Northwest Territories'); states_ref[57] = new stateset('CA','Nova Scotia'); states_ref[58] = new stateset('CA','Nunavut'); states_ref[59] = new stateset('CA','Ontario'); states_ref[60] = new stateset('CA','Prince Edward Island'); states_ref[61] = new stateset('CA','Quebec'); states_ref[62] = new stateset('CA','Saskatchewan'); states_ref[63] = new stateset('CA','Yukon'); states_ref[64] = new stateset('IN','Andhra Pradesh'); states_ref[65] = new stateset('IN','Arunachal Pradesh'); states_ref[66] = new stateset('IN','Assam'); states_ref[67] = new stateset('IN','Bihar'); states_ref[68] = new stateset('IN','Chhattisgarh'); states_ref[69] = new stateset('IN','Delhi'); states_ref[70] = new stateset('IN','Goa'); states_ref[71] = new stateset('IN','Gujarat'); states_ref[72] = new stateset('IN','Haryana'); states_ref[73] = new stateset('IN','Himachal Pradesh'); states_ref[74] = new stateset('IN','Jammu & Kashmir'); states_ref[75] = new stateset('IN','Jharkhand'); states_ref[76] = new stateset('IN','Karnataka'); states_ref[77] = new stateset('IN','Kerala'); states_ref[78] = new stateset('IN','Madhya Pradesh'); states_ref[79] = new stateset('IN','Maharashtra'); states_ref[80] = new stateset('IN','Manipur'); states_ref[81] = new stateset('IN','Mizoram'); states_ref[82] = new stateset('IN','Nagaland'); states_ref[83] = new stateset('IN','Orissa'); states_ref[84] = new stateset('IN','Punjab'); states_ref[85] = new stateset('IN','Rajasthan'); states_ref[86] = new stateset('IN','Sikkim'); states_ref[87] = new stateset('IN','Tamil Nadu'); states_ref[88] = new stateset('IN','Tripura'); states_ref[89] = new stateset('IN','Uttarakhand'); states_ref[90] = new stateset('IN','Uttar Pradesh'); states_ref[91] = new stateset('IN','West Bengal'); states_ref[92] = new stateset('IN','UNION TERRITORY'); states_ref[93] = new stateset('IN','Andaman & Nicobar'); states_ref[94] = new stateset('IN','Chandigarh'); states_ref[95] = new stateset('IN','Dadra and Nagar Haveli'); states_ref[96] = new stateset('IN','Lakshadweep'); function createStates(xcountry,chosenState){ var stateorregion = chosenState; var srCount = 0; var spcount = 0; $("#state_region option").remove(); $("#state_region").removeAttr("disabled"); $("#hstate").slideDown("fast"); $("#state_region").slideDown("fast"); $("#state_region").append("\n"); for(srCount=0;srCount < states_ref.length; srCount++){ if(xcountry==""){ if(states_ref[srCount].state==stateorregion){ $("#state_region").append("\n"); }else{ $("#state_region").append("\n"); } }else if(xcountry==states_ref[srCount].country){ //count the available states/provinces spcount = spcount + 1; if(states_ref[srCount].state==stateorregion){ $("#state_region").append("\n"); }else{ $("#state_region").append("\n"); } } } $("#state_region").find("option").each(function(){ if(($(this).val() == "UNION TERRITORY")||($(this).val() == "")){ $(this).attr("disabled","disabled"); $(this).css("font-color","#5B5B5B"); $(this).css("font-weight","bold"); } }); if(spcount<=0){ $("#state_region").hide(); $("#hstate").hide(); $("#state_region").attr("disabled","disabled"); $("#state_region").slideUp("fast"); $("#hstate").slideUp("fast"); } } function validateScriptTags(sender){ var newValue = sender.replace(/[~`!@#$%^&*()-_+={}\|:;\"\',.<>0123456789]+/g, ""); return newValue; } function validateScriptTagsPostal(sender){ var newValue = sender.replace(/[~`!@#$%^&*()-_+={}\|:;\"\',.<>]+/g, ""); return newValue; } function validateEmail(email) { var emailReg = /^([\w-\.]+@([\w-]+\.)+[\w-]{2,4})?$/; if( !emailReg.test( email ) ) { return false; } else { return true; } } function checkASCII(str){ //need to remove numbers first before checking str = str.replace(/^[\s\d]+/, ""); for (var i=0;i < str.length;i++){ asciiNum = str.charCodeAt(i); if ((asciiNum == 20) || ((asciiNum > 64) && (asciiNum < 91)) || ((asciiNum > 96) && (asciiNum < 123))){ return true; }else { return false; break; } } } var x = new RegExp("[\x00-\x80]+"); // is ascii.. the numbers are the ASCII range var isAscii = ""; var prepforAscii = ""; // This file demonstrates the different options of the pagination plugin // It also demonstrates how to use a JavaScript data structure to // generate the paginated content and how to display more than one // item per page with items_per_page. /** * Callback function that displays the content. * * Gets called every time the user clicks on a pagination link. * * @param {int}page_index New Page index * @param {jQuery} jq the container with the pagination links as a jQuery object */ function pageselectCallback(page_index, jq){ // Get number of elements per pagionation page from form var items_per_page = $('#items_per_page').val(); var max_elem = Math.min((page_index+1) * items_per_page, news.length); var newcontent = ''; // Iterate through a selection of the content and build an HTML string for(var i=page_index*items_per_page;i' + news[i].news_title + '
'; newcontent += ' '+news[i].news_datetime+' by '+news[i].news_author+'
'; newcontent += news[i].news_excerpt + '
'; } // Replace old content with new content newcontent = '
Gomez PEER Zone News - Current
'+newcontent; $('#Searchresult').html(newcontent); // Prevent click event propagation return false; } // The form contains fields for many pagiantion optiosn so you can // quickly see the resuluts of the different options. // This function creates an option object for the pagination function. // This will be be unnecessary in your application where you just set // the options once. function getOptionsFromForm(){ var opt = {callback: pageselectCallback}; // Collect options from the text fields - the fields are named like their option counterparts $("input:hidden").each(function(){ opt[this.name] = this.className.match(/numeric/) ? parseInt(this.value) : this.value; }); // Avoid html injections in this demo var htmlspecialchars ={ "&":"&", "<":"<", ">":">", '"':"""} $.each(htmlspecialchars, function(k,v){ opt.prev_text = opt.prev_text.replace(k,v); opt.next_text = opt.next_text.replace(k,v); }) return opt; } function createTopNews(NewsObjArray,numbertoshow){ var rettext = ''; var i = 0; var str = ''; // ".get_the_title()."
rettext = rettext + ""; rettext = rettext + ""; rettext = rettext + ""; rettext = rettext + ""; rettext = rettext + ""; rettext = rettext + ""; rettext = rettext + ""; rettext = rettext + "
PEERZONE PROMOTIONS
"; for (i=0;i < numbertoshow;i++){ rettext = rettext + ''+NewsObjArray[i].news_title+'
'; str = NewsObjArray[i].news_excerpt; rettext = rettext + ''+str.substring(0,35)+'...
'; } rettext = rettext + "
 
"; return rettext; } function createSurvey(strURL){ var rettext = ''; var str = ''; str = str + ''; str = str + ''; str = str + ''; str = str + ''; str = str + '
'; str = str + ''; str = str + '
'; rettext = str; return rettext; } /*Password Strength*/ (function($){ var passwordStrength = new function() { this.countRegexp = function(val, rex) { var match = val.match(rex); return match ? match.length : 0; } this.getStrength = function(val, minLength) { var len = val.length; // too short =( if (len < minLength) { return 0; } var nums = this.countRegexp(val, /\d/g), lowers = this.countRegexp(val, /[a-z]/g), uppers = this.countRegexp(val, /[A-Z]/g), specials = len - nums - lowers - uppers; // just one type of characters =( if (nums == len || lowers == len || uppers == len || specials == len) { return 1; } var strength = 0; if (nums) { strength+= 2; } if (lowers) { strength+= uppers? 4 : 3; } if (uppers) { strength+= lowers? 4 : 3; } if (specials) { strength+= 5; } if (len > 10) { strength+= 1; } return strength; } this.getStrengthLevel = function(val, minLength) { var strength = this.getStrength(val, minLength); switch (true) { case (strength <= 0): return 1; break; case (strength > 0 && strength <= 4): return 2; break; case (strength > 4 && strength <= 8): return 3; break; case (strength > 8 && strength <= 12): return 4; break; case (strength > 12): return 5; break; } return 1; } } $.fn.password_strength = function(options) { var settings = $.extend({ 'container' : '#newpasswordtextpasswordstrength', 'minLength' : 6, 'texts' : { 1 : 'Too weak', 2 : 'Weak password', 3 : 'Normal strength', 4 : 'Strong password', 5 : 'Very strong password' }, 'onCheck': null }, options); return this.each(function() { if (settings.container) { var container = $(settings.container); } else { var container = $('').attr('class', 'password_strength'); $(this).after(container); } $(this).keyup(function() { var val = $(this).val(); if (val.length > 0) { var level = passwordStrength.getStrengthLevel(val, settings.minLength); var _class = 'password_strength_' + level; if (!container.hasClass(_class) && level in settings.texts) { container.text(settings.texts[level]).attr('class', 'password_strength ' + _class); } } else { container.text('').attr('class', 'password_strength'); } if (settings.onCheck) { settings.onCheck.call(this, level) } }); }); }; })(jQuery); (function($){ $.fn.popupWindow = function(instanceSettings){ return this.each(function(){ $(this).click(function(){ $.fn.popupWindow.defaultSettings = { centerBrowser:0, // center window over browser window? {1 (YES) or 0 (NO)}. overrides top and left centerScreen:0, // center window over entire screen? {1 (YES) or 0 (NO)}. overrides top and left height:500, // sets the height in pixels of the window. left:0, // left position when the window appears. location:0, // determines whether the address bar is displayed {1 (YES) or 0 (NO)}. menubar:0, // determines whether the menu bar is displayed {1 (YES) or 0 (NO)}. resizable:0, // whether the window can be resized {1 (YES) or 0 (NO)}. Can also be overloaded using resizable. scrollbars:0, // determines whether scrollbars appear on the window {1 (YES) or 0 (NO)}. status:0, // whether a status line appears at the bottom of the window {1 (YES) or 0 (NO)}. width:500, // sets the width in pixels of the window. windowName:null, // name of window set from the name attribute of the element that invokes the click windowURL:null, // url used for the popup top:0, // top position when the window appears. toolbar:0 // determines whether a toolbar (includes the forward and back buttons) is displayed {1 (YES) or 0 (NO)}. }; settings = $.extend({}, $.fn.popupWindow.defaultSettings, instanceSettings || {}); var windowFeatures = 'height=' + settings.height + ',width=' + settings.width + ',toolbar=' + settings.toolbar + ',scrollbars=' + settings.scrollbars + ',status=' + settings.status + ',resizable=' + settings.resizable + ',location=' + settings.location + ',menuBar=' + settings.menubar; settings.windowName = this.name || settings.windowName; settings.windowURL = this.href || settings.windowURL; var centeredY,centeredX; if(settings.centerBrowser){ if ($.browser.msie) {//hacked together for IE browsers centeredY = (window.screenTop - 120) + ((((document.documentElement.clientHeight + 120)/2) - (settings.height/2))); centeredX = window.screenLeft + ((((document.body.offsetWidth + 20)/2) - (settings.width/2))); }else{ centeredY = window.screenY + (((window.outerHeight/2) - (settings.height/2))); centeredX = window.screenX + (((window.outerWidth/2) - (settings.width/2))); } window.open(settings.windowURL, settings.windowName, windowFeatures+',left=' + centeredX +',top=' + centeredY).focus(); }else if(settings.centerScreen){ centeredY = (screen.height - settings.height)/2; centeredX = (screen.width - settings.width)/2; window.open(settings.windowURL, settings.windowName, windowFeatures+',left=' + centeredX +',top=' + centeredY).focus(); }else{ window.open(settings.windowURL, settings.windowName, windowFeatures+',left=' + settings.left +',top=' + settings.top).focus(); } return false; }); }); }; })(jQuery); /*drop down menu*/ //** Smooth Navigational Menu- By Dynamic Drive DHTML code library: http://www.dynamicdrive.com //** Script Download/ instructions page: http://www.dynamicdrive.com/dynamicindex1/ddlevelsmenu/ //** Menu created: Nov 12, 2008 //** Dec 12th, 08" (v1.01): Fixed Shadow issue when multiple LIs within the same UL (level) contain sub menus: http://www.dynamicdrive.com/forums/showthread.php?t=39177&highlight=smooth //** Feb 11th, 09" (v1.02): The currently active main menu item (LI A) now gets a CSS class of ".selected", including sub menu items. //** May 1st, 09" (v1.3): //** 1) Now supports vertical (side bar) menu mode- set "orientation" to 'v' //** 2) In IE6, shadows are now always disabled //** July 27th, 09" (v1.31): Fixed bug so shadows can be disabled if desired. //** Feb 2nd, 10" (v1.4): Adds ability to specify delay before sub menus appear and disappear, respectively. See showhidedelay variable below //** Dec 17th, 10" (v1.5): Updated menu shadow to use CSS3 box shadows when the browser is FF3.5+, IE9+, Opera9.5+, or Safari3+/Chrome. Only .js file changed. var ddsmoothmenu={ //Specify full URL to down and right arrow images (23 is padding-right added to top level LIs with drop downs): arrowimages: {down:['downarrowclass', 'down.gif', 23], right:['rightarrowclass', 'right.gif']}, //transition: {overtime:300, outtime:300}, //duration of slide in/ out animation, in milliseconds transition: {overtime:0, outtime:-40}, shadow: {enable:true, offsetx:5, offsety:5}, //enable shadow? showhidedelay: {showdelay: 100, hidedelay: 200}, //set delay in milliseconds before sub menus appear and disappear, respectively ///////Stop configuring beyond here/////////////////////////// detectwebkit: navigator.userAgent.toLowerCase().indexOf("applewebkit")!=-1, //detect WebKit browsers (Safari, Chrome etc) detectie6: document.all && !window.XMLHttpRequest, css3support: window.msPerformance || (!document.all && document.querySelector), //detect browsers that support CSS3 box shadows (ie9+ or FF3.5+, Safari3+, Chrome etc) getajaxmenu:function($, setting){ //function to fetch external page containing the panel DIVs var $menucontainer=$('#'+setting.contentsource[0]) //reference empty div on page that will hold menu $menucontainer.html("Loading Menu...") $.ajax({ url: setting.contentsource[1], //path to external menu file async: true, error:function(ajaxrequest){ $menucontainer.html('Error fetching content. Server Response: '+ajaxrequest.responseText) }, success:function(content){ $menucontainer.html(content) ddsmoothmenu.buildmenu($, setting) } }) }, buildmenu:function($, setting){ var smoothmenu=ddsmoothmenu var $mainmenu=$("#"+setting.mainmenuid+">ul") //reference main menu UL $mainmenu.parent().get(0).className=setting.classname || "ddsmoothmenu" var $headers=$mainmenu.find("ul").parent() $headers.hover( function(e){ $(this).children('a:eq(0)').addClass('selected') }, function(e){ $(this).children('a:eq(0)').removeClass('selected') } ) $headers.each(function(i){ //loop through each LI header var $curobj=$(this).css({zIndex: 100-i}) //reference current LI header var $subul=$(this).find('ul:eq(0)').css({display:'block'}) $subul.data('timers', {}) this._dimensions={w:this.offsetWidth, h:this.offsetHeight, subulw:$subul.outerWidth(), subulh:$subul.outerHeight()} this.istopheader=$curobj.parents("ul").length==1? true : false //is top level header? $subul.css({top:this.istopheader && setting.orientation!='v'? this._dimensions.h+"px" : 0}) /* $curobj.children("a:eq(0)").css(this.istopheader? {paddingRight: smoothmenu.arrowimages.down[2]} : {}).append( //add arrow images '' ) */ if (smoothmenu.shadow.enable && !smoothmenu.css3support){ //if shadows enabled and browser doesn't support CSS3 box shadows this._shadowoffset={x:(this.istopheader?$subul.offset().left+smoothmenu.shadow.offsetx : this._dimensions.w), y:(this.istopheader? $subul.offset().top+smoothmenu.shadow.offsety : $curobj.position().top)} //store this shadow's offsets if (this.istopheader) $parentshadow=$(document.body) else{ var $parentLi=$curobj.parents("li:eq(0)") $parentshadow=$parentLi.get(0).$shadow } this.$shadow=$('
').prependTo($parentshadow).css({left:this._shadowoffset.x+'px', top:this._shadowoffset.y+'px'}) //insert shadow DIV and set it to parent node for the next shadow div } $curobj.hover( function(e){ var $targetul=$subul //reference UL to reveal var header=$curobj.get(0) //reference header LI as DOM object clearTimeout($targetul.data('timers').hidetimer) $targetul.data('timers').showtimer=setTimeout(function(){ header._offsets={left:$curobj.offset().left, top:$curobj.offset().top} var menuleft=header.istopheader && setting.orientation!='v'? 0 : header._dimensions.w menuleft=(header._offsets.left+menuleft+header._dimensions.subulw>$(window).width())? (header.istopheader && setting.orientation!='v'? -header._dimensions.subulw+header._dimensions.w : -header._dimensions.w) : menuleft //calculate this sub menu's offsets from its parent if ($targetul.queue().length<=1){ //if 1 or less queued animations $targetul.css({left:menuleft+"px", width:header._dimensions.subulw+'px'}).animate({height:'show',opacity:'show'}, ddsmoothmenu.transition.overtime) if (smoothmenu.shadow.enable && !smoothmenu.css3support){ var shadowleft=header.istopheader? $targetul.offset().left+ddsmoothmenu.shadow.offsetx : menuleft var shadowtop=header.istopheader?$targetul.offset().top+smoothmenu.shadow.offsety : header._shadowoffset.y if (!header.istopheader && ddsmoothmenu.detectwebkit){ //in WebKit browsers, restore shadow's opacity to full header.$shadow.css({opacity:1}) } header.$shadow.css({overflow:'', width:header._dimensions.subulw+'px', left:shadowleft+'px', top:shadowtop+'px'}).animate({height:header._dimensions.subulh+'px'}, ddsmoothmenu.transition.overtime) } } }, ddsmoothmenu.showhidedelay.showdelay) }, function(e){ var $targetul=$subul var header=$curobj.get(0) clearTimeout($targetul.data('timers').showtimer) $targetul.data('timers').hidetimer=setTimeout(function(){ $targetul.animate({height:'hide', opacity:'hide'}, ddsmoothmenu.transition.outtime) if (smoothmenu.shadow.enable && !smoothmenu.css3support){ if (ddsmoothmenu.detectwebkit){ //in WebKit browsers, set first child shadow's opacity to 0, as "overflow:hidden" doesn't work in them header.$shadow.children('div:eq(0)').css({opacity:0}) } header.$shadow.css({overflow:'hidden'}).animate({height:0}, ddsmoothmenu.transition.outtime) } }, ddsmoothmenu.showhidedelay.hidedelay) } ) //end hover }) //end $headers.each() if (smoothmenu.shadow.enable && smoothmenu.css3support){ //if shadows enabled and browser supports CSS3 shadows var $toplevelul=$('#'+setting.mainmenuid+' ul li ul') var css3shadow=parseInt(smoothmenu.shadow.offsetx)+"px "+parseInt(smoothmenu.shadow.offsety)+"px 5px #aaa" //construct CSS3 box-shadow value var shadowprop=["boxShadow", "MozBoxShadow", "WebkitBoxShadow", "MsBoxShadow"] //possible vendor specific CSS3 shadow properties for (var i=0; i\n' +mainselector+' ul li a {background:'+setting.customtheme[0]+';}\n' +mainmenuid+' ul li a:hover {background:'+setting.customtheme[1]+';}\n' +'') } this.shadow.enable=(document.all && !window.XMLHttpRequest)? false : this.shadow.enable //in IE6, always disable shadow jQuery(document).ready(function($){ //ajax menu? if (typeof setting.contentsource=="object"){ //if external ajax menu ddsmoothmenu.getajaxmenu($, setting) } else{ //else if markup menu ddsmoothmenu.buildmenu($, setting) } }) } } //end ddsmoothmenu variable function swapImages(){ var $active = $('div#homebanner .active'); var $next = ($('div#homebanner .active').next().length > 0) ? $('div#homebanner .active').next() : $('div#homebanner img:first'); $active.fadeOut(function(){ $active.removeClass('active'); $next.fadeIn().addClass('active'); }); } function swapBackgrounds(){ if(counter==0){ $("#homebanner2").fadeIn("slow", function() { $("#homebanner1").fadeOut("slow"); counter++; }); }else if(counter==1){ $("#homebanner1").fadeIn("slow", function() { $("#homebanner2").fadeOut("slow"); counter=0; }); } } function SetUpHomeBoxes(){ if($("#greenbox").size()){ $("#greenbox").click(function(){ window.location.href="http://www.gomezpeerzone.com/peer-program-overview/"; }); } if($("#orangebox").size()){ $("#orangebox").click(function(){ window.location.href="http://www.gomezpeerzone.com/peer-program-overview/"; }); } if($("#yellowbox").size()){ $("#yellowbox").click(function(){ window.location.href="http://www.gomezpeerzone.com/peer-program-overview/"; }); } if($("#bluebox").size()){ $("#bluebox").click(function(){ window.location.href="http://www.gomezpeerzone.com/application-apply/"; }); } if($(".gomezlogo").size()){ $(".gomezlogo").mouseover(function(){ $(".gomezlogo").css("cursor","pointer"); }); $(".gomezlogo").click(function(){ window.location.href="/"; }); } } function insertBanners(x){ //homeBannerContainer $("#homeBannerContainer").append("
"); $("div#homebanner1").css("background-image", "url("+DomainURL+"images/home-banner-3.jpg)" ); $("div#homebanner1").append("
"); // $("div#homeBannerNav1").append("FaceBook"); // $("div#homeBannerNav1").append("FaceBook"); // $("div#homeBannerNav1").append("TwitterButton"); // $("div#homeBannerNav1").append("Twitterlink"); $("#homeBannerContainer").append("
"); $("div#homebanner2").css("background-image", "url("+DomainURL+"images/home-banner-1.jpg)" ); $("div#homebanner2").append("
"); $("div#homeBannerNav2").append("Learn More"); $("#homeBannerContainer").append("
"); $("div#homebanner3").css("background-image", "url("+DomainURL+"images/home-banner-2.jpg)" ); $("div#homebanner3").append("
"); if(x=="1"){ $("div#homeBannerNav3").append("Refer Here"); }else{ $("div#homeBannerNav3").append("Refer Here"); } $("#homebanner1").hide(); $("#homebanner2").hide(); $("#homebanner3").hide(); } function buildflag(){ $("div.location_flags").css("width", "18px" ); $("div.location_flags").css("height", "14px" ); $("div.location_flags").css("background-image", "url(http://www.gomezpeerzone.com/wp-content/themes/peerzone/images/flag_dropdown.png)" ); $("div.location_flags").css("background-repeat", "no-repeat" ); $("div.location_flags").css("text-indent", "25px" ); $("div.location_flags").css("padding", "0px 3px" ); $("div.location_flags").css("float", "left" ); $("#location_flag_uk").css("background-position", "0px -743px" ); $("#location_flag_sa").css("background-position", "0px -715px" ); $("#location_flag_se").css("background-position", "0px -687px" ); $("#location_flag_za").css("background-position", "0px -659px" ); $("#location_flag_es").css("background-position", "0px -631px" ); $("#location_flag_sg").css("background-position", "0px -603px" ); $("#location_flag_no").css("background-position", "0px -519px" ); $("#location_flag_nl").css("background-position", "0px -491px" ); $("#location_flag_mx").css("background-position", "0px -463px" ); $("#location_flag_br").css("background-position", "0px -435px" ); $("#location_flag_kr").css("background-position", "0px -407px" ); $("#location_flag_it").css("background-position", "0px -351px" ); $("#location_flag_in").css("background-position", "0px -323px" ); $("#location_flag_hk").css("background-position", "0px -295px" ); $("#location_flag_de").css("background-position", "0px -267px" ); $("#location_flag_fi").css("background-position", "0px -211px" ); $("#location_flag_dk").css("background-position", "0px -183px" ); $("#location_flag_cn").css("background-position", "0px -771px" ); $("#location_flag_ca").css("background-position", "0px -127px" ); $("#location_flag_be").css("background-position", "0px -99px" ); $("#location_flag_at").css("background-position", "0px -71px" ); $("#location_flag_au").css("background-position", "0px -43px" ); $("#location_flag_en").css("background-position", "0px -15px" ); $("#location_flag_fr").css("background-position", "0px -239px" ); $("#location_flag_sp").css("background-position", "0px -631px" ); $("#location_flag_pt").css("background-position", "0px -575px" ); $("#location_flag_jp").css("background-position", "0px -379px" ); } function LoadSlideShow(){ if($("#homeBannerContainer").size()){ x = ""; insertBanners(x); $("#homebanner1").show(); setInterval("swapBackgrounds()", 6000); } } function buildMenuAndCurrentFlag(){ ddsmoothmenu.init({ mainmenuid: "smoothmenu1", //menu DIV id orientation: 'h', //Horizontal or vertical menu: Set to "h" or "v" classname: 'ddsmoothmenu', //class added to menu's outer DIV //customtheme: ["#1c5a80", "#18374a"], contentsource: "markup" //"markup" or ["container_id", "path_to_menu_file"] }); $("#mainLanguage").css("width", "18px" ); $("#mainLanguage").css("height", "16px" ); $("#mainLanguage").css("background-image", "url(http://www.gomezpeerzone.com/wp-content/themes/peerzone/images/flag_dropdown.png)" ); $("#mainLanguage").css("background-repeat", "no-repeat" ); $("#mainLanguage").css("text-indent", "25px" ); $("#mainLanguage").css("padding", "0px 3px" ); $("#mainLanguage").css("float", "left" ); $("#mainLanguage").css("margin-top", "7px" ); $("#mainLanguage").css("background-position","0px 0px")} function newcheckPassword(strPass){ //rules //1. 7-20 characters //2. do not include common words or names //3. combine uppercase letters, lowercase letters, numbers, and symbols. var str = ""; $("#errPass").remove(); if($.trim(strPass)!=""){ if((strPass.length>6)&&(strPass.length<21)){ str = ""; passError = 0; conError = 0; $("#newpasswordtext").slideUp("fast"); }else{ str = "Your password must have 7 - 20 characters."; passError = 1; $("#newpasswordtext").append("
"+str+"
"); $("#newpasswordtext").slideDown("fast"); } }else{ str = ""; passError = 0; conError = 0; $("#newpasswordtext").slideUp("fast"); } } function confirmnewcheckPassword(newStrPass, confirmStrPass){ var str = ""; $("#errConfirmPass").remove(); if($.trim(newStrPass)!=""){ if(newStrPass!=confirmStrPass){ str = "Your new confirm password must match your new password."; conError = 1; passError = 1; }else{ str = ""; conError = 0; passError = 0; } }else{ str = ""; conError = 0; passError = 0; } //$("#confirmnewpasswordtext").append("
"+str+"
"); return str; } function formValidation(xpage){ var str = ""; $("#errPass").remove(); if(xpage!="passwordretrieval"){ if(($("#username").size())&&($("#username").attr("type")!="hidden")){ if($.trim($("#username").val())==""){ str = str + "You must enter a Username
"; }else if($.trim($("#username").val())!=""){ //remove all special characters first cause isAscii will think its English as soon it sees a english like punctuation. if(!checkASCII($.trim($("#username").val()))){ if(isNaN($.trim($("#username").val()))){ if(xpage!="xlogin"){ //check if its all a number if so the its fine else str = str + "Please use standard English characters when completing the Username field
"; } } } } } if(($("#email").size())&&($("#email").attr("type")!="hidden")){ if($.trim($("#email").val())==""){ str = str + "You must enter a PayPal email address
"; }else if ($.trim($("#email").val())!=""){ if (!validateEmail($.trim($("#email").val()))){ str = str + "You must enter a PayPal email address
"; } } } }else{ if ((($("#username").size())&&($("#username").attr("type")!="hidden"))||(($("#email").size())&&($("#email").attr("type")!="hidden"))){ if(($("#username").size())&&($.trim($("#username").val())!="")){ if($.trim($("#username").val())==""){ str = str + "You must enter a username and PayPal email address
"; }else if($.trim($("#username").val())!=""){ //remove all special characters first cause isAscii will think its English as soon it sees a english like punctuation. if(!checkASCII($.trim($("#username").val()))){ if(isNaN($.trim($("#username").val()))){ if(xpage!="xlogin"){ str = str + "Please use standard English characters when completing the Username field
"; } } } } }else if(($("#email").size())&&($.trim($("#email").val())=="")){ if($.trim($("#email").val())==""){ str = str + "You must enter a username and PayPal email address
"; }else if ($.trim($("#email").val())!=""){ if (!validateEmail($.trim($("#email").val()))){ str = str + "You must enter a PayPal email address
"; } } } } } if(($("#firstname").size())&&($("#firstname").attr("type")!="hidden")){ if($.trim($("#firstname").val())==""){ str = str + "You must enter a first name
"; }else if($.trim($("#firstname").val())!=""){ if(!checkASCII($.trim($("#firstname").val()))){ str = str + "Please use standard English characters when completing the first name field
"; } } } if(($("#lastname").size())&&($("#lastname").attr("type")!="hidden")){ if($.trim($("#lastname").val())==""){ str = str + "You must enter a last name
"; }else if($.trim($("#lastname").val())!=""){ //remove all special characters first cause isAscii will think its English as soon it sees a english like punctuation. if(!checkASCII($.trim($("#lastname").val()))){ str = str + "Please use standard English characters when completing the last name field
"; } } } if(($("#address1").size())&&($("#address1").attr("type")!="hidden")){ if($.trim($("#address1").val())==""){ str = str + "You must enter an address
"; }else if($.trim($("#address1").val())!=""){ if(!checkASCII($.trim($("#address1").val()))){ str = str + "Please use standard English characters when completing the address field
"; } } } if(($("#city").size())&&($("#size").attr("type")!="hidden")){ if($.trim($("#city").val())==""){ str = str + "You must enter a city
"; } } if(($("#country").size())&&($("#country").attr("type")!="hidden")){ if($.trim($("#country").val())==""){ if(($.trim($("#country").val())=="US")||($.trim($("#country").val())=="CA")||($.trim($("#country").val())=="IN")){ str = str + "You must enter a country
"; } } if(($.trim($("#country").val())!="")&&(($.trim($("#country").val())=="US")||($.trim($("#country").val())=="CA")||($.trim($("#country").val())=="IN"))){ if($.trim($("#state_region").val())==""){ str = str + "You must enter a State/Province/Region
"; } } } if(($("#postalcode").size())&&($("#postalcode").attr("type")!="hidden")){ if($.trim($("#postalcode").val())==""){ if(($.trim($("#country").val())=="US")){ str = str + "You must enter a Zip Code / Postal Code
"; } }else if($.trim($("#postalcode").val())!=""){ if(!$.isNumeric($.trim($("#postalcode").val()))){ //remove all special characters first cause isAscii will think its English as soon it sees a english like punctuation. if($.trim($("#postalcode").val())==""){ if(($.trim($("#country").val())=="US")){ str = str + "You must enter a Zip Code / Postal Code
"; } }else{ if(!checkASCII($.trim($("#postalcode").val()))){ if(($.trim($("#country").val())=="US")){ str = str + "Please use standard English characters when completing the zip code/postal code field
"; } } } } } } if(($("#paymentAccount").size())&&($("#paymentAccount").attr("type")!="hidden")){ if($.trim($("#paymentAccount").val())==""){ str = str + "You must enter a PayPal email account
"; } } if((($("#paymentAccount").size())&&($("#paymentAccountconfirmation").size()))&&(($("#paymentAccount").attr("type")!="hidden")&&($("#paymentAccountconfirmation").attr("type")!="hidden"))){ if($.trim($("#paymentAccount").val())!=$.trim($("#paymentAccountconfirmation").val())){ str = str + "PayPal Email Address and Confirm PayPal Email Address must match
"; } } if(($("#message").size())&&($("#size").attr("type")!="hidden")){ if($.trim($("#message").val())==""){ str = str + "Please enter your message
"; } } if((($("#confirmpassword").size())&&($("#newpassword").size()))&&(($("#confirmpassword").attr("type")!="hidden")&&($("#newpassword").attr("type")!="hidden"))){ if($("#confirmpassword").val()!=$("#newpassword").val()){ str = str + "Password and Confirm Password must match
"; } if(($.trim($("#confirmpassword").val())=="")||($.trim($("#newpassword").val())=="")){ str = str + "You must enter a password
"; } } if(xpage=="updatepassword"){ if(($.trim($("#confirmnewpassword").val())=="")||($.trim($("#newpassword").val())=="")){ str = str + "You must enter a password
"; } } if((($("#confirmnewpassword").size())&&($("#newpassword").size()))&&(($("#confirmnewpassword").attr("type")!="hidden")&&($("#newpassword").attr("type")!="hidden"))){ if($("#confirmnewpassword").val()!=$("#newpassword").val()){ str = str + "Password and Confirm Password must match
"; } if(($.trim($("#confirmnewpassword").val())=="")||($.trim($("#newpassword").val())=="")){ str = str + "You must enter a password
"; } } if(xpage=="xlogin"){ if(($.trim($("#password").val())=="")){ str = str + "You must enter a password
"; } } if((($("#confirmemail").size())&&($("#email").size()))&&(($("#confirmemail").attr("type")!="hidden")&&($("#email").attr("type")!="hidden"))){ if($("#confirmemail").val()!=$("#email").val()){ str = str + "Email and Confirm Email must match
"; } } if(str.length>0){ passError = 1; }else{ passError = 0; } //clear system webservice errors $(".error").html(" 
"); $("#uierror").append("
"+str+"
 
"); if(str.length>0){ $("html, body").animate({ scrollTop: 0 }, 0); } } function hideShow(){ if($("#typequestion").val()=="Additional Information"){ $("div#subject").slideDown("fast"); }else{ $("div#subject").slideUp("fast"); } } function openclose(id){ var str = "_"; var retstr = ""; retstr = id.substring((id.indexOf(str)),(id.length)); if($("#answer"+retstr).is(":hidden")){ $("#answer"+retstr).slideDown("slow"); }else{ $("#answer"+retstr).slideUp("slow"); } } function alertBox(x){ if(x=="messageBox"){ $("#messageBox").fadeIn("fast"); }else if(x=="pmessageBox"){ $("#pmessageBox").fadeIn("fast"); }else if(x=="ContactUsmessageBox"){ $("#ContactUsmessageBox").fadeIn("fast"); } } function closeAlertBox(){ $("#messageBox").fadeOut("fast"); $("#pmessageBox").fadeOut("fast"); $("#ContactUsmessageBox").fadeOut("fast"); } function switchalertBox(){ if($("#mBox_bottom").text()!="EN"){ //means it WAS english and we are switching the box to chinese $("#mBox_bottom").html(""); $("#mBox_bottom").html("EN"); $("#mBox_title_container").html(""); $("#mBox_title_container").html($("#mBox_chinese_title").html()); $("#mbox_message_context").html(""); $("#mbox_message_context").html($("#mBox_chinese_content").html()); }else if ($("#mBox_bottom").text()=="EN"){ //means it WAS english and we are switching the box to english $("#mBox_bottom").html(""); $("#mBox_bottom").html("中文"); $("#mBox_title_container").html(""); $("#mBox_title_container").html($("#mBox_english_title").html()); $("#mbox_message_context").html(""); $("#mbox_message_context").html($("#mBox_english_content").html()); } } function statezip(){ if($("#country").size()){ if(($("#country").val()!="US")&&($("#country").val()!="CA")&&($("#country").val()!="IN")){ $("#state_region").hide(); $("#hstate").hide(); }else{ $("#state_region").show(); $("#hstate").show(); } if($("#country").val()!="US"){ $("#postalcode").hide(); $("#ziprow").hide(); }else{ $("#postalcode").show(); $("#ziprow").show(); } $("#country").change(function(){ if(($("#country").val()!="US")&&($("#country").val()!="CA")&&($("#country").val()!="IN")){ $("#state_region").slideUp(); $("#hstate").slideUp(); }else{ $("#state_region").slideDown(); $("#hstate").slideDown(); } if($("#country").val()!="US"){ $("#postalcode").slideUp("fast"); $("#ziprow").slideUp("fast"); }else{ $("#postalcode").slideDown("fast"); $("#ziprow").slideDown("fast"); } }); } } function stumbleInit(){ (function() { var li = document.createElement('script'); li.type = 'text/javascript'; li.async = true; li.src = 'https://platform.stumbleupon.com/1/widgets.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(li, s); })(); }