function popUp(URL,width,height){day=new Date;id=day.getTime();eval("page"+id+"=window.open(URL,'"+id+"', 'toolbar=0,scrollbars=1,location=0,statusbar=1,menubar=0,resizable=1,width="+width+",height="+height+",left=126,top= 0');")}function popUpforuploader(URL,id,width,height){eval("page"+id+"=window.open(URL,'"+id+"', 'toolbar=0,scrollbars=1,location=0,statusbar=1,menubar=0,resizable=1,width=550,height=800,left = 126,top = 0');")}function showdivs(a){var b=document.getElementById(a).style.display;if(b=="block")document.getElementById(a).style.display="none";else document.getElementById(a).style.display="block"}function taketootherpage(a){document.location=a}function createCookie(e,d,b){if(b){var a=new Date;a.setTime(a.getTime()+b*24*60*60*1e3);var c=";expires="+a.toGMTString()}else var c="";document.cookie=e+"="+d+c+";path=/"}function readCookie(e){for(var c=e+"=",d=document.cookie.split(";"),b=0;b<d.length;b++){var a=d[b];while(a.charAt(0)==" ")a=a.substring(1,a.length);if(a.indexOf(c)==0)return a.substring(c.length,a.length)}return null}function eraseCookie(a){createCookie(a,"",-1)}function IsNumeric(b){var d="0123456789.",a=true,c;for(i=0;i<b.length&&a==true;i++){c=b.charAt(i);if(d.indexOf(c)==-1)a=false}return a}function trimAll(a){var b=/^(\s*)$/;if(b.test(a)){a=a.replace(b,"");if(a.length==0)return a}b=/^(\s*)([\W\w]*)(\b\s*$)/;if(b.test(a))a=a.replace(b,"$2");return a}function validateNotEmpty(b){var a=b;a=trimAll(a);if(a.length>0)return true;return false}function get_cookie(c){var b=c+"=",a="";if(document.cookie.length>0){offset=document.cookie.indexOf(b);if(offset!=-1){offset+=b.length;end=document.cookie.indexOf(";",offset);if(end==-1)end=document.cookie.length;a=unescape(document.cookie.substring(offset,end))}}return a}function pad_with_zeros(f,c){var a=f.toString(),b=a.indexOf(".");if(b==-1){decimal_part_length=0;a+=c>0?".":""}else decimal_part_length=a.length-b-1;var d=c-decimal_part_length;if(d>0)for(var e=1;e<=d;e++)a+="0";return a}function round_decimals(b,a){var c=b*Math.pow(10,a),d=Math.round(c),e=d/Math.pow(10,a);return pad_with_zeros(e,a)}function showblocks(b){var a="none";document.getElementById("accountinfo").style.display=a;document.getElementById("shipnbill").style.display=a;document.getElementById("ordhistory").style.display=a;document.getElementById("rewards").style.display=a;document.getElementById("mywishlist").style.display=a;document.getElementById(b).style.display="block"}function showdescorreview(a){document.getElementById("mydesc").style.display="none";document.getElementById("myreview").style.display="none";document.getElementById(a).style.display="block"}function emptybox(a){document.getElementById(a).innerHTML=""}function cleanup(){document.getElementById("search-box-style").value=""}function showup(){var a="search-box-style",b=trimAll(document.getElementById(a).value);if(b=="")document.getElementById(a).value="Search"}function checkifdeliveryopt(){if(document.getElementById("cost").value==""){alert("Select Delivery Option");return false}}function showdeliverycost(){var a="costopt";if(document.getElementById(a).style.display=="none")document.getElementById(a).style.display="block";else if(document.getElementById(a).style.display=="block")document.getElementById(a).style.display="none"}function showshowaddress(){document.getElementById("showaddress").style.display="block"}function validatebillingddress(c){var a=true,b=false;if(document.getElementById("radiobuttonsame").checked==a){checkputvalue(c);b=a}else if(document.getElementById("radiobuttondiff").checked==a)b=a;if(b==false){alert("Select Billing Option");return false}else checkfields()}function popUpforuploader(URL,id,width,height){eval("page"+id+"=window.open(URL,'"+id+"', 'toolbar=0,scrollbars=1,location=0,statusbar=1,menubar=0,resizable=1,width=550,height=800,left = 126,top = 0');")}function showopts(){document.getElementById("subsopts").style.display="block"}function hideopts(){document.getElementById("subsopts").style.display="none"}function WordCountDesc(c){var b="The maximum amount of words of 50 has been reached",a=c.value.split(/[\s{1,}]/);document.getElementById("wordcntdesc").innerHTML="Count of words "+a.length;a.length>=50&&alert(b)}function WordCountKey(c){var b="The maximum amount of words of 50 has been reached",a=c.value.split(/[\s{1,}]/);document.getElementById("wordcntkey").innerHTML="Count of words "+a.length;a.length>=50&&alert(b)}function CharactercountCount(c){var b="The maximum amount of characters of 255 has been reached",a=c.value;document.getElementById("titlecntchar").innerHTML="Count of characters "+a.length;a.length==255&&alert(b)}
  function DisplayFormValues(d){
                
  var b=document.getElementById(d).elements  ;

  for(a=0;a<b.length;a++){

    var c=b[a].value;

    if(c!="" ){

      forminput=myfunc(c);
      if(forminput==false)return forminput
    }
  }
  return forminput
}


function strtolower(b){var a=b.toLowerCase();return a}
function myfunc(e){

var c="Wrong Type input",a=false,b=-1;for(var o="%#^&+=[]';/{}\":<>?",q="<script>",g="</sc"+"ript>",h="<object>",i="</object>",j="<embed>",l="</embed>",k="alert",m="+",n=" and ",p=" or ",f=0;f<e.length;f++)if(o.indexOf(e.charAt(f))!=b){alert("Containts special characters. \n These are not allowed.\n Please remove them and try again.");inputstate=a;return a}var d=strtolower(e);if(d.indexOf(g)!=b){alert(c);inputstate=a;return a}if(d.indexOf(g)!=b){alert(c);inputstate=a;return a}if(d.indexOf(h)!=b){alert(c);inputstate=a;return a}if(d.indexOf(i)!=b){alert(c);inputstate=a;return a}if(d.indexOf(j)!=b){alert(c);inputstate=a;return a}if(d.indexOf(l)!=b){alert(c);inputstate=a;return a}if(d.indexOf(k)!=b){alert(c);inputstate=a;return a}if(d.indexOf(m)!=b){alert(c);inputstate=a;return a}if(d.indexOf(n)!=b){alert(c);inputstate=a;return a}if(d.indexOf(p)!=b){alert(c);inputstate=a;return a}return true}function cleartextboxmessage(a,b){if(document.getElementById(a).value==b)document.getElementById(a).value=""}function showtextboxmessage(a,b){var c=trimAll(document.getElementById(a).value);if(c=="")document.getElementById(a).value=b}var RecaptchaOptions={theme:"white"};