/* --------------------------------------------------------------------------------
File Name.........: include2009/clientscripts/Required.js
Copyright.........: (c) MATTHEWS SOFTWARE INC.
..................: Licensed by Agreement to Ford Motor Co.
Last Changed......: 5-11-2010; CSF
-------------------------------------------------------------------------------- */
function SetStandardStartupFocus(){try{document.getElementsByTagName("body")[0].focus()}catch(a){}}function ScrollToTop(){try{window.scrollTo(0,0)}catch(a){}}function ShowGroup(c){var b="a-"+c,d=$("#"+b+"").next(),a=$("#"+b+"").children();a.toggleClass("cat-group-click");if(d.css("display")=="none"){d.slideDown(300)}else{d.slideUp(100)}}function removeBlanks(d){var a="",b,e;for(b=0;b<d.length;b+=1){e=d.charAt(b);if(e!==" "){a+=e}}return a}function GetCookieNumeric(f,a){var d=removeBlanks(document.cookie),e=d.split(";"),b,c;for(b=0;b<e.length;b+=1){c=e[b].split("=");if(c[0]==f){if(c.length>1){return c[1]}else{return 0}}}if(a!==undefined){return a}else{return 0}}function GetCookieString(e){var c=document.cookie,d,a,b;c=removeBlanks(c);d=c.split(";");for(a=0;a<d.length;a+=1){b=d[a].split("=");if(b[0]==e){if(b.length>1){return b[1].replace(/~/g," ")}else{return""}}}return""}function GetQueryStringNumeric(e){var c=String(document.URL),d,a,b;c=removeBlanks(c.substring(c.indexOf("?")+1,c.length));d=c.split("&");for(a=0;a<d.length;a+=1){b=d[a].split("=");if(String(b[0]).toLowerCase()==String(e).toLowerCase()){if(b.length>1){return b[1]}else{return 0}}}return 0}function GetQueryString(e){var c=String(document.URL),d,a,b;c=c.substring(c.indexOf("?")+1,c.length);d=c.split("&");for(a=0;a<d.length;a+=1){b=d[a].split("=");if(b[0]==e){if(b.length>1){return unescape(b[1])}else{return""}}}return""}function RSExecute2(){var c="",a,b;for(b=1;b<arguments.length;b+=1){if(b>1){c=c+"&"}c=c+"par"+b+"="+escape(arguments[b])}if(typeof(arguments[arguments.length-1])==="function"){a=new Ajax.Request(arguments[0],{method:"post",parameters:c,asynchronous:true,onComplete:arguments[arguments.length-1]})}else{a=new Ajax.Request(arguments[0],{method:"post",parameters:c,asynchronous:false});return a.transport.responseText}}function getXmlNodeValue(c,b){var e="",a;try{if(b.substr(0,1)=="@"){e=c.getAttribute(b.substr(1,(b.length-1)))}else{a=c.getElementsByTagName(b)[0];if(a===undefined){a=c.getElementsByTagName(b.split(":")[1])[0]}e=a.text;if(e===undefined){e=a.textContent}}}catch(d){e=null}return e}function logoutuser_onclick(){try{if(GetCookieNumeric("validuser")==1){window.location.href="../include/serverscripts/logout_post.asp"}else{window.location.href="../home/login.asp"}}catch(a){}}function ShowDisclaimer(){$("#pageFoot .disclaimer div").css("display","block")}function HideDisclaimer(){$("#pageFoot .disclaimer div").css("display","none")}function addCommas(b){var a=new RegExp("(-?[0-9]+)([0-9]{3})");while(a.test(b)){b=b.replace(a,"$1,$2")}return b}function removeCommas(b){var a=/,/g;return b.replace(a,"")}var FRPP=(function(){return{ajax:function(b,c,a,d){if($.isFunction(a)){d=a;a={}}$.post("../include2009/serverscripts/frpp2010.asp?type="+b+"&action="+c,a,d,"json")},stringify:function(a){alert(JSON.stringify(a,null,4))}}}());