1// Multimedia Patient Education Script ---------------------------------------------- 2function openitCustom1(moveId){ 3var logoPath = "http://www.irisradiology.com/flash/logo-webmovies.swf"; 4var filePath = "http://www.hipsknees.info/basemovie/basemovie.asp?moveId="+moveId+"&logofile="+logoPath+"&presents=IRIS Radiology MRI and Imaging Specialists in Neurology Spine and Orthopedics Houston Texas"; 5 newwindow = window.open(filePath,"newwin5","scrollbars=no,toolbar=no,location=no,directories=no,menubar=no,resizable=no,status=no,width=732,height=453"); 6 newwindow.focus(); 7} 8 9 10// BMI Calculator 11 12function mod(div,base) 13{ 14 return Math.round(div - (Math.floor(div/base)*base)); 15} 16 17function calcBmi() 18{ 19var w = document.bmi.weight.value * 1; 20var HeightFeetInt = document.bmi.htf.value * 1; 21var HeightInchesInt = document.bmi.hti.value * 1; 22HeightFeetConvert = HeightFeetInt * 12; 23h = HeightFeetConvert + HeightInchesInt; 24displaybmi = (Math.round((w * 703) / (h * h))); 25var rvalue = true; 26 if ( (w <= 35) || (w >= 999) || (h <= 48) || (h >= 120) ) 27 { 28 alert ("Invalid data. Please check and re-enter!"); 29 rvalue = false; 30 } 31 32 if (rvalue) 33 { 34 if (HeightInchesInt > 11) 35 { 36 reminderinches = mod(HeightInchesInt,12); 37 document.bmi.hti.value = reminderinches; 38 document.bmi.htf.value = HeightFeetInt + 39 ((HeightInchesInt - reminderinches)/12); 40 document.bmi.answer.value = displaybmi; 41 } 42 document.bmi.answer.value = displaybmi; 43 } 44 return rvalue; 45} 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 // To open a popup window ------------------------------------------------------------------------------// 64function MM_openBrWindow(theURL,winName,features) { 65 window.open(theURL,winName,features); 66} 67 68// Newsletter Subscription Form --------------------------------------------------------------------------// 69function Newsletter() { 70 mailid = document.newsMail.email 71 if (mailid.value == '') 72 { 73 alert("Please enter E-mail Id"); 74 mailid.focus() 75 return false 76 } 77 else if (mailid.value.indexOf("@")==-1 || mailid.value.indexOf(".")==-1){ 78 alert("Invalid E-mail ID") 79 mailid.focus() 80 return false 81 } 82} 83 84// Feedback form validation 85function Feedback() { 86 firstName = document.fbForm.txtFirstname 87 if (firstName.value == "") { 88 alert("Please enter your first name"); 89 firstName.focus() 90 return false 91 } 92 if (!isNaN(firstName.value)) { 93 alert("Invalid first name"); 94 firstName.focus() 95 return false 96 } 97 98 lastName = document.fbForm.txtlastname 99 if (lastName.value == "") { 100 alert("Please enter your last name"); 101 lastName.focus() 102 return false 103 } 104 if (!isNaN(lastName.value)) { 105 alert("Invalid last name"); 106 lastName.focus() 107 return false 108 } 109 110 dayPhone = document.fbForm.txtworkphone 111 if (isNaN(dayPhone.value)) { 112 alert("Phone number you have entered is invalid"); 113 dayPhone.focus() 114 return false 115 } 116 117 eveningPhone = document.fbForm.txthomephone 118 if (isNaN(eveningPhone.value)) { 119 alert("Phone number you have entered is invalid"); 120 eveningPhone.focus() 121 return false 122 } 123 124 mailid = document.fbForm.txtemail 125 if (mailid.value == '') { 126 alert("Please enter E-mail Id"); 127 mailid.focus() 128 return false 129 } else if (mailid.value.indexOf("@") == -1 || mailid.value.indexOf(".") == -1) { 130 alert("Invalid E-mail ID") 131 mailid.focus() 132 return false 133 } 134 135 age = document.fbForm.cmbAgeRange 136 if (age.options[age.selectedIndex].value == "") { 137 alert("Please select your age group"); 138 age.focus() 139 return false 140 } 141 142 sportsAct = document.fbForm.txtsports 143 if (sportsAct.value != "" && !isNaN(sportsAct.value)) { 144 alert("Please enter Sports Activities"); 145 sportsAct.focus() 146 return false 147 } 148 149 comments = document.fbForm.txtComments 150 if (comments.value == "" || !isNaN(comments.value)) { 151 alert("Please add your comments"); 152 comments.focus() 153 return false 154 } 155 if (document.fbForm.captcha.value == "") { 156 alert('Enter the code as it is shown'); 157 document.fbForm.captcha.focus(); 158 return false; 159 } 160 return jcap(); 161 162 163} 164 165// Appointments form validation ------------------------------------------------------------------------------// 166function Appointment() 167{ 168if (document.frmAppointment.txtFirstName.value=="" || !isNaN(document.frmAppointment.txtFirstName.value)) 169 { 170 alert('Enter FirstName'); 171 document.frmAppointment.txtFirstName.focus(); 172 return false;
173 } 174if (document.frmAppointment.txtSurname.value=="" || !isNaN(document.frmAppointment.txtSurname.value)) 175 { 176 alert('Enter Surname'); 177 document.frmAppointment.txtSurname.focus(); 178 return false; 179 } 180if (document.frmAppointment.txtHomePhoneNumber.value=="" ) 181 { 182 alert('Enter Home Phone No.'); 183 document.frmAppointment.txtHomePhoneNumber.focus(); 184 return false; 185 } 186 187 188if (document.frmAppointment.txtEmailAddress.value=="") 189 { 190 alert('Enter Email Address'); 191 document.frmAppointment.txtEmailAddress.focus(); 192 return false; 193 } 194 else if (document.frmAppointment.txtEmailAddress.value.indexOf("@")==-1 || document.frmAppointment.txtEmailAddress.value.indexOf(".")==-1){ 195 alert("Invalid E-mail ID") 196 document.frmAppointment.txtEmailAddress.focus() 197 return false 198 } 199 200 if (document.frmAppointment.uword.value=="" ) 201 { 202 alert('Enter the code as it is shown'); 203 document.frmAppointment.uword.focus(); 204 return false; 205 } 206 return jcap(); 207} 208 209// Contact Us form validation ------------------------------------------------------------------------------// 210function Contactus() { 211 212 firstName = document.cuForm.txtName 213 if (firstName.value == "" || !isNaN(firstName.value)) 214 { 215 alert("Please enter your first name"); 216 firstName.focus() 217 return false 218 } 219 220 mailid = document.cuForm.txtEmail 221 if (mailid.value == '') 222 { 223 alert("Please enter E-mail Id"); 224 mailid.focus() 225 return false 226 } 227 else if (mailid.value.indexOf("@")==-1 || mailid.value.indexOf(".")==-1){ 228 alert("Invalid E-mail ID") 229 mailid.focus() 230 return false 231 } 232 233 comments = document.cuForm.txtMessage 234 if (comments.value == "" || !isNaN(comments.value)) 235 { 236 alert("Please add your comments"); 237 comments.focus() 238 return false 239 } 240 if (document.cuForm.uword.value=="" ) 241 { 242 alert('Enter the code as it is shown'); 243 document.cuForm.uword.focus(); 244 return false; 245 } 246 return jcap(); 247 248 249} 250 251// Testimonials form validation ------------------------------------------------------------------------------// 252 253function Testimonials() { 254 255 256
257 yourName = document.TestimonialsForm.txtyourname 258 259 if (yourName.value == "") 260 261 { 262 263 alert("Please enter Your Name"); 264 265 yourName.focus() 266 267 return false 268 269 } 270 271 272 if (!isNaN(yourName.value)) 273 274 { 275 276 alert("Invalid name"); 277 278 yourName.focus() 279 280 return false 281 282 } 283 284 285 286 mailid = document.TestimonialsForm.txtyouremail 287 288 if (mailid.value == '') 289 290 { 291 292 alert("Please enter Your E-mail Id"); 293 294 mailid.focus() 295 296 return false 297 298 } 299 300 else if (mailid.value.indexOf("@")==-1 || mailid.value.indexOf(".")==-1){ 301 302 alert("Invalid E-mail ID") 303 304 mailid.focus() 305 306 return false 307 308 } 309 310 311 312 testimonial = document.TestimonialsForm.txttestimonial 313 314 if (testimonial.value == "" || !isNaN(testimonial.value)) 315 316 { 317 318 alert("Please add Your Testimonial"); 319 320 testimonial.focus() 321 322 return false 323 324 } 325 326 327 328 if (document.TestimonialsForm.captcha.value=="" ) 329 330 { 331 332 alert('Enter the code as it is shown'); 333 334 document.TestimonialsForm.captcha.focus(); 335 336 return false; 337 338 } 339 340 return jcap(); 341 342 343 344 345 346} 347 348 349 350//tell a friend validations 351 352 353function Tellform() { 354 355 356 357 358 txtName = document.tellForm.txtName 359 360 if (txtName.value == "") 361 362 { 363 364 alert("Please enter Your Name"); 365 366 txtName.focus() 367 368 return false; 369 370 } 371 372 if (!isNaN(txtName.value)) 373 374 { 375 376 alert("Invalid name"); 377 378 txtName.focus() 379 380 return false 381 382 } 383 384 385 386 387 388 mailid = document.tellForm.txtEmail 389 390 if (mailid.value == '') 391 392 { 393 394 alert("Please enter Your E-mail Id"); 395 396 mailid.focus() 397 398 return false 399 400 } 401 402 else if (mailid.value.indexOf("@")==-1 || mailid.value.indexOf(".")==-1){ 403 404 alert("Invalid E-mail ID") 405 406 mailid.focus() 407 408 return false 409 410 } 411 412 413 414 txtfrndName = document.tellForm.txtfrndName 415 416 if (txtfrndName.value == "") 417 418 { 419 420 alert("Please add Your Friend name"); 421 422 txtfrndName.focus() 423 424 return false 425 426 } 427 428 429 430 if (!isNaN(txtfrndName.value)) 431 432 { 433 434 alert("Invalid Friend name"); 435 436 txtfrndName.focus() 437 438 return false 439 440 } 441 442 443 444 445 frndmailid = document.tellForm.txtfrndEmail 446 447 if (frndmailid.value == '') 448 449 { 450 451 alert("Please enter your friend E-mail id"); 452 453 frndmailid.focus() 454 455 return false 456 457 } 458 459 else if (frndmailid.value.indexOf("@")==-1 || frndmailid.value.indexOf(".")==-1){ 460 461 alert("Invalid friend E-mail ID") 462 463 frndmailid.focus() 464 465 return false 466 467 } 468 469 470 if (document.tellForm.captcha.value=="" ) 471 472 { 473 474 alert('Enter the code as it is shown'); 475 476 document.tellForm.captcha.focus(); 477 478 return false; 479 480 } 481 482 return jcap(); 483 484 485 486 487 488} 489 490//Random Images ------------------------------------------------------------------------------// 491 492 function getCookie(c_name) 493 { 494 if (document.cookie.length>0) 495 { 496 c_start=document.cookie.indexOf(c_name + "=") 497 if (c_start!=-1) 498 { 499 c_start=c_start + c_name.length+1 500 c_end=document.cookie.indexOf(";",c_start) 501 if (c_end==-1) c_end=document.cookie.length 502 return unescape(document.cookie.substring(c_start,c_end)) 503 } 504 } 505 return null 506 } 507 508 function randImagesCookie() 509 { 510 if(getCookie('name')==null || getCookie('name')=="NaN") 511 { 512 document.cookie="name"+"="+1; 513 } 514 var cimgnum=getCookie('name'); 515 if(cimgnum >= 4) { 516 var simgnum=1; 517 } else { 518 var simgnum=parseInt(cimgnum)+1; 519 } 520 521 for(i=1; i<=4; i++) 522 { 523 524 var imagename = "cori_header_"+simgnum+"_"+i 525 document.cookie="name"+"="+simgnum; 526 527 var tmp = eval("document.getElementById('index"+i+"')") 528 var picPath="images/"+imagename+".jpg"; 529 tmp.style.backgroundImage="url('"+picPath+"')"; 530 } 531 } 532 533 534// BMI Calculator 535function converttometers(ht) 536{ 537 return (ht/100); 538} 539function calculatebmi(ht,wt) 540{ 541return (wt/Math.pow(ht,2)); 542} 543function btnCalcbmi() 544{ 545if (document.frmbmi.txtheight.value != '') 546{ 547 var ht=converttometers(document.frmbmi.txtheight.value); 548 var wt=document.frmbmi.txtweight.value; 549 var bmi=Math.round(calculatebmi(ht,wt)); 550 document.frmbmi.txtbmi.value=parseInt(bmi); 551 552 if (parseInt(bmi) <19)
553document.frmbmi.comment.value = "Underweight"; 554if (parseInt(bmi) >=19 && parseInt(bmi) <=25) 555document.frmbmi.comment.value = "Desirable"; 556if (parseInt(bmi) >=26 && parseInt(bmi) <=29) 557document.frmbmi.comment.value = "Prone to health risks"; 558if (parseInt(bmi) >=30 && parseInt(bmi) <=40) 559document.frmbmi.comment.value = "Obese"; 560if (parseInt(bmi) >40) 561document.frmbmi.comment.value = "Extremely obese"; 562 563} 564else 565{ 566 alert("Please enter your weight and height"); 567 return false; 568} 569} 570 571 572 573/*AutoPrint ------------------------------------------------------------------------------*/ 574 575var gAutoPrint = true; // Tells whether to automatically call the print function 576 577function printSpecial() 578{ 579if (document.getElementById != null) 580{ 581var html = '<HTML>\n<HEAD>\n'; 582 583if (document.getElementsByTagName != null) 584{ 585var headTags = document.getElementsByTagName("head"); 586if (headTags.length > 0) 587html += headTags[0].innerHTML; 588} 589 590html += '\n</HEAD>\n<BODY style=\"background:#3c568c;\">\n'; 591html += '\n<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" width=\"80%\"><tr><td class=\"textMain\">\n'; 592 593 594var printReadyElem = document.getElementById("printReady"); 595 596if (printReadyElem != null) 597{ 598html += printReadyElem.innerHTML; 599} 600else 601{ 602alert("Could not find the printReady function"); 603return; 604} 605html += '\n</td></tr></table>\n'; 606html += '\n</BODY>\n</HTML>'; 607 608var printWin = window.open("","printSpecial"); 609printWin.document.open(); 610printWin.document.write(html); 611printWin.document.close(); 612if (gAutoPrint) 613printWin.print(); 614} 615else 616{ 617alert("The print ready feature is only available if you are using an browser. Please update your browser."); 618} 619} 620 621// Font Size Increasing ------------------------------------------------------------------------------// 622 623var min=8; 624var max=15; 625function increaseFontSize() 626{ 627 628 var p = document.getElementsByTagName('p'); 629 for(i=0;i<p.length;i++) 630 { 631 if(p[i].style.fontSize) 632 { 633 var s = parseInt(p[i].style.fontSize.replace("px","")); 634 } else 635 { 636 var s = 12; 637 } 638 if(s!=max) 639 { 640 s += 1; 641 } 642 p[i].style.fontSize = s+"px" 643 644 645 } 646 var li = document.getElementsByTagName('li'); 647 648 for(i=0;i<li.length;i++) 649 { 650 if(li[i].style.fontSize) 651 { 652 var s = parseInt(li[i].style.fontSize.replace("px","")); 653 } 654 else 655 { 656 var s = 12; 657 } 658 if(s!=max) 659 { 660 s += 1; 661 } 662 li[i].style.fontSize = s+"px" 663 } 664 665 666 var a = document.getElementsByTagName('a'); 667 668 for(i=0;i<a.length;i++) 669 { 670 if(a[i].style.fontSize) 671 { 672 var s = parseInt(a[i].style.fontSize.replace("px","")); 673 } 674 else 675 { 676 var s = 12; 677 } 678 if(s!=max) 679 { 680 s += 1; 681 } 682 a[i].style.fontSize = s+"px" 683 } 684 685 686 var span = document.getElementsByTagName('span'); 687 688 for(i=0;i<span.length;i++) 689 { 690 if(span[i].style.fontSize) 691 { 692 var s = parseInt(span[i].style.fontSize.replace("px","")); 693 } 694 else 695 { 696 var s = 12; 697 } 698 if(s!=max) 699 { 700 s += 1; 701 } 702 span[i].style.fontSize = s+"px" 703 } 704 705 706 var td = document.getElementsByTagName('td'); 707 708 for(i=0;i<td.length;i++) 709 { 710 if(td[i].style.fontSize) 711 { 712 var s = parseInt(td[i].style.fontSize.replace("px","")); 713 } 714 else 715 { 716 var s = 12; 717 } 718 if(s!=max) 719 { 720 s += 1; 721 } 722 td[i].style.fontSize = s+"px" 723 } 724} 725 726 727function decreaseFontSize() 728{ 729 730 var p = document.getElementsByTagName('p'); 731 732 for(i=0;i<p.length;i++) 733 734 { 735 736 if(p[i].style.fontSize) 737 738 { 739 var s = parseInt(p[i].style.fontSize.replace("px","")); 740 } else 741 { 742 var s = 12; 743 } 744 if(s!=min) 745 { 746 s -= 1; 747 } 748 p[i].style.fontSize = s+"px" 749} 750 751 752 753 var li = document.getElementsByTagName('li'); 754 755 for(i=0;i<li.length;i++) 756 757 { 758 759 if(li[i].style.fontSize) 760 761 { 762 var s = parseInt(li[i].style.fontSize.replace("px","")); 763 } else 764 { 765 var s = 12; 766 } 767 if(s!=min) 768 { 769 s -= 1; 770 } 771 li[i].style.fontSize = s+"px" 772} 773 774 775var a = document.getElementsByTagName('a'); 776 777 for(i=0;i<a.length;i++) 778 779 { 780 781 if(a[i].style.fontSize) 782 783 { 784 var s = parseInt(a[i].style.fontSize.replace("px","")); 785 } else 786 { 787 var s = 12; 788 } 789 if(s!=min) 790 { 791 s -= 1; 792 } 793 a[i].style.fontSize = s+"px" 794} 795 796 797var span = document.getElementsByTagName('span'); 798 799 for(i=0;i<span.length;i++) 800 801 { 802 803 if(span[i].style.fontSize) 804 805 { 806 var s = parseInt(span[i].style.fontSize.replace("px","")); 807 } else 808 { 809 var s = 12; 810 } 811 if(s!=min) 812 { 813 s -= 1; 814 } 815 span[i].style.fontSize = s+"px" 816} 817 818 819 820 var td = document.getElementsByTagName('td'); 821 822 for(i=0;i<td.length;i++) 823 824 { 825 826 if(td[i].style.fontSize) 827 828 { 829 var s = parseInt(td[i].style.fontSize.replace("px","")); 830 } else 831 { 832 var s = 12; 833 } 834 if(s!=min) 835 { 836 s -= 1; 837 } 838 td[i].style.fontSize = s+"px" 839} 840 841 842 843} 844 845// Image Preloader -------------------------------------------------------------------------------// 846 847<!-- 848function MM_swapImgRestore() { //v3.0 849 var i,x,a=document.MM_sr;
849 for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc; 850} 851function MM_preloadImages() { //v3.0 852 var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array(); 853 var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++) 854 if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}} 855} 856 857function MM_findObj(n, d) { //v4.01 858 var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) { 859 d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);} 860 if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n]; 861 for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); 862 if(!x && d.getElementById) x=d.getElementById(n); return x; 863} 864 865function MM_swapImage() { //v3.0 866 var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3) 867 if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];} 868} 869//--> 870 871 872// Submit Your Testimonial Upload Image-----------------------------------------------------------------------// 873 874function addElement(id,test) { 875 876 var ni = document.getElementById(id); 877 var numi = document.getElementById('theValue'); 878 //alert(ni+" "+numi.value); 879 //alert(numi.value); 880 //var num = (document.getElementById('theValue').value -1)+ 2; 881 882 if(numi.value<2) 883 { 884 var num = (numi.value -1)+ 2; 885 numi.value = num; 886 } else { 887 return false; 888 } 889 var newdiv = document.createElement('div'); 890 var divId = 'row'+num; 891 892 newdiv.setAttribute('id',divId); 893 894 //alert(test.length); 895 for(var i=0;i<test.length;i++){ 896 var input=document.createElement('input'); 897 input.setAttribute('type','file'); 898 input.setAttribute('class','txtfield'); 899 input.setAttribute('className','txtfield'); 900 901 input.setAttribute('name',test[i]+'[]'); 902 newdiv.appendChild(input); 903 } 904 var a=document.createElement('a'); 905 906 //a.href='javascript:removeElement(\''+divId+'\');'; 907 a.href='#'; 908 a.onclick=function(){removeElement(divId,id);return false;} 909 910 a.innerHTML='<div style="width:80px; margin-left:190px; float:left; position:absolute; margin-top:-20px;"><input type="button" name="button" value="- Remove" class="button"></div>'; 911 newdiv.appendChild(a); 912 913 ni.appendChild(newdiv); 914 915} 916 917function removeElement(divNum,fieldsetid) { 918 919 var d = document.getElementById(fieldsetid); 920 var olddiv = document.getElementById(divNum); 921 d.removeChild(olddiv); 922 document.getElementById('theValue').value--; 923 924} 925function trim_obj(obj){ 926obj.value=obj.value.replace(/^[\r\n\s]+|[\r\n\s]+$/g,''); 927return(obj) 928} 929// Tell A Friend JS ---------- 930// Tell A Friend JS ---------- 931$(document).ready(function() { 932 $('#tell-frnd').click(function() { 933 $(".tell-div, #tell-main").fadeIn(300); 934 $('html, body').animate({ 935 scrollTop: 0 936 }, 'slow'); 937 }); 938 $('.tell-close').click(function() { 939 $(".tell-div, #tell-main").fadeOut(100); 940 }); 941 window.onkeydown = function(e) { 942 var key = e.keyCode ? e.keyCode : e.which; 943 if (key == 27) { 944 $(".tell-div, #tell-main").fadeOut(100); 945 } 946 } 947}); 948// SiteMap JS ---------- 949$(document).ready(function() { 950 $('#sitemapMenu ul').removeAttr('class'); 951 $('#sitemapMenu ul').removeAttr('id'); 952 $('#sitemapMenu li').removeAttr('class'); 953 $('#sitemapMenu li').removeAttr('id'); 954}); 955// ScrollTop JS ---------- 956$(document).ready(function() { 957 $('body').append('<div id="backtotop" class="backtotop"><a href="javascript:void(0);">Top</a></div>'); 958 $(window).scroll(function() { 959 if ($(this).scrollTop() != 0) { 960 $('#backtotop').fadeIn('slow'); 961 } else { 962 $('#backtotop').fadeOut('fast'); 963 } 964 }); 965 $('#backtotop').click(function() { 966 $('body,html').animate({ 967 scrollTop: 0 968 }, 900); 969 }); 970});
971document.write('<script src="http://www.ypo.education/js/jsembedcode.js"></script>'); 972document.write('<script type="text/javascript">var cpiic ="Mzk0OTgyLjQ=";</script>');
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.