String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"")};String.prototype.ltrim=function(){return this.replace(/^\s+/,"")};String.prototype.rtrim=function(){return this.replace(/\s+$/,"")};function openWinSubmit(A){var B=window.open("about:blank","submitWin","toolbar=no, directories=no, status=yes, menubar=no, resizable=yes, scrollbars=yes, width=1024, height=750");A.target="submitWin";A.submit();B.focus()}function validText(B){var A=/^[A-z0-9-'.'-','-'-'-' ']*$/;if(!A.test(B.value)){B.value=B.value.replace(/[^A-z0-9-'.'-','-'-'-' ']/g,"");return false}return true}function goSearch(){var B=document.forms["pmSearch"];var A=B.keyword.value;if(!A||A.length<=1){alert("Please type at least 2 characters!");return }else{if(!validText(B.keyword)){alert("Only letters, numbers, space, dots, commas and '-' characters are allowed!");return }}B.action=getSearchURL(0);B.submit()}function createForm(){var A=document.createElement("FORM");document.body.appendChild(A);return A}function createNewFormElement(B,A,C){var D=document.createElement("<input name='"+A+"' type='hidden'>");D.value=C;B.appendChild(D);return D}function goSearchPrice(A,C){var B=createForm();B.method="POST";B.action=getSearchURL(A);createNewFormElement(B,"pSeqId",C);B.submit()}function getFormElementsAsString(I){var E="";var H;H=(document.getElementById(I)||document.forms[I]);var A,G,D,J;var F=false;for(var C=0;C<H.elements.length;C++){A=H.elements[C];J=H.elements[C].disabled;G=H.elements[C].name;D=H.elements[C].value;if(!J&&G){switch(A.type){case"select-one":case"select-multiple":for(var B=0;B<A.options.length;B++){if(A.options[B].selected){if(window.ActiveXObject){E+=encodeURIComponent(G)+"="+encodeURIComponent(A.options[B].attributes["value"].specified?A.options[B].value:A.options[B].text)+"&"}else{E+=encodeURIComponent(G)+"="+encodeURIComponent(A.options[B].hasAttribute("value")?A.options[B].value:A.options[B].text)+"&"}}}break;case"radio":case"checkbox":if(A.checked){E+=encodeURIComponent(G)+"="+encodeURIComponent(D)+"&"}break;case"file":case undefined:case"reset":case"button":case"submit":break;default:E+=encodeURIComponent(G)+"="+encodeURIComponent(D)+"&"}}}E=E.substr(0,E.length-1);return E}function isPrice(B){var A=/^\d*(?:\.\d{0,2})?$/;if(!A.test(B)){return false}return true}function isNumeric(D){var A="0123456789";var C;for(var B=0;B<D.length;B++){C=D.charAt(B);if(A.indexOf(C)==-1){return false}}return true}function getValues(F,C){var B="";var E=F.split("&");var A;for(var D=0;D<E.length;D++){A=E[D].split("=");if(A.length>1){if(A[0]==C){return A[1]}}}return }function expandAllParents(A,D){var C=true;var B=D.parent;while(C==true){if(B.isRoot()){C=false}else{B.expand();B=B.parent}}}function getCookie(C){var B=C+"=";var A=0;while(A<=document.cookie.length){var D=(A+B.length);if(document.cookie.substring(A,D)==B){if((endOfCookie=document.cookie.indexOf(";",D))==-1){endOfCookie=document.cookie.length}return unescape(document.cookie.substring(D,endOfCookie))}A=document.cookie.indexOf(" ",A)+1;if(A==0){break}}return""}function setCookie(C,D,A){var B=new Date();B.setDate(B.getDate()+A);B.setHours(0,0,0);document.cookie=C+"="+escape(D)+"; path=/; expires="+B.toGMTString()+";"}var offsetfrommouse=[15,15];var displayduration=0;var currentimageheight=300;if(document.getElementById||document.all){document.write('<div id="trailimageid" style="position:absolute;  z-index:5;">');document.write("</div>")}function gettrailobj(){if(document.getElementById){return document.getElementById("trailimageid").style}else{if(document.all){return document.all.trailimagid.style}}}function gettrailobjnostyle(){if(document.getElementById){return document.getElementById("trailimageid")}else{if(document.all){return document.all.trailimagid}}}function truebody(){return(!window.opera&&document.compatMode&&document.compatMode!="BackCompat")?document.documentElement:document.body}function showtrail(C,B,A){if(A>0){currentimageheight=A}gettrailobj().left="-500px";document.onmousemove=followmouse;newHTML='<div style="width:410px; height:377; padding: 5px; background-color: #FFF; border: 1px solid #888;">';newHTML=newHTML+"<table width=100% height=377 border=0 cellpadding=0 cellspacing=0>";newHTML=newHTML+"<tr><td height=10></td></tr>";newHTML=newHTML+"<tr><td align=center><h3>"+B+"</h3></td></tr>";newHTML=newHTML+'<tr><td align=center><img src="'+C+'" border="0"></td></tr>';newHTML=newHTML+"</table>";newHTML=newHTML+"</div>";gettrailobjnostyle().innerHTML=newHTML;gettrailobj().display="inline"}function hidetrail(){gettrailobj().innerHTML=" ";gettrailobj().display="none";document.onmousemove="";gettrailobj().left="-500px"}function followmouse(E){var B=offsetfrommouse[0];var A=offsetfrommouse[1];var D=document.all?truebody().scrollLeft+truebody().clientWidth:pageXOffset+window.innerWidth-15;var C=document.all?Math.min(truebody().scrollHeight,truebody().clientHeight):Math.min(window.innerHeight);if(typeof E!="undefined"){if(D-E.pageX<380){B=E.pageX-B-420}else{B+=E.pageX}if(C-E.pageY<(currentimageheight+110)){A+=E.pageY-Math.max(0,(110+currentimageheight+E.pageY-C-truebody().scrollTop))}else{A+=E.pageY}}else{if(typeof window.event!="undefined"){if(D-event.clientX<380){B=event.clientX+truebody().scrollLeft-B-420}else{B+=truebody().scrollLeft+event.clientX}if(C-event.clientY<(currentimageheight+110)){A+=event.clientY+truebody().scrollTop-Math.max(0,(110+currentimageheight+event.clientY-C))}else{A+=truebody().scrollTop+event.clientY}}}var D=document.all?truebody().scrollLeft+truebody().clientWidth:pageXOffset+window.innerWidth-15;var C=document.all?Math.max(truebody().scrollHeight,truebody().clientHeight):Math.max(document.body.offsetHeight,window.innerHeight);if(A<0){A=A*-1}gettrailobj().left=B+"px";gettrailobj().top=A+"px"}function decodeString(D){var C=unescape(D);var A=new Array(" ","!",'"',"#","$","%","&","'","(",")","*","+",",","-",".","/","0","1","2","3","4","5","6","7","8","9",":",";","<","=",">","?","@","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","[","\\","]","^","_","`","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","{","|","}","~"," ","c","u","e","a","a","a","a","c","e","e","e","i","i","i","a","a","e","ae","ae","o","o","o","u","u","y","u","u","o","l","0","x","f","a","i","o","u","n","n","*","O","?","r","_","?","?","!","<",">","_","_","_","|","|","a","a","a","c","|","|","+","+","c","y","+","+","-","-","+","-","+","a","a","+","+","-","-","|","-","+",".",".","d","e","e","e","i","i","i","i","+","+","_","_","|","i","_","o","o","o","o","o","o","u","p","p","u","u","u","y","y","_","'","-","?","_","?","?","S","÷","¸","°","¨","·","¹","³","²","_"," ");C=C.replace(new RegExp("\\=\r\n","gim"),"");var B=32;for(B=32;B<100;B++){C=C.replace(new RegExp("&#"+B+";","gim"),A[B-32]);C=C.replace(new RegExp("&#0"+B+";","gim"),A[B-32]);C=C.replace(new RegExp("&#00"+B+";","gim"),A[B-32])}var B=100;for(B=100;B<256;B++){C=C.replace(new RegExp("&#"+B+";","gim"),A[B-32]);C=C.replace(new RegExp("&#0"+B+";","gim"),A[B-32])}return C}