PageSourceSearch

https://www.figtreeprivate.com.au/common/js/ramsay.js

js figtreeprivate.com.au collected 2026-10-07 22:59:42 UTC 6,179 bytes, 179 lines download raw bytes

1/* ***********************
2** Search redirection
3** ***********************
4*/
5function handleKeyPress(e){
6var charCode;
7
8//Get key code (support for all browsers)
9if(e && e.which){
10    charCode = e.which;
11}else if(window.event){
12    e = window.event;
13    charCode = e.keyCode;
14}
15
16if(charCode === 13) {
17   gotoSearchPage();
18}
19}
20
21function gotoSearchPage()
22{
23	if ( document.getElementById("SiteSearch").value != "" )
24	{
25/*		e = window.event;
26		try {
27			window.location.replace("/lib/Search?Sitesearch=" + document.getElementById('SiteSearch').value);
28		} 
29		catch(e) {
30			window.location = "/lib/Search?Sitesearch=" + document.getElementById('SiteSearch').value;
31		}
32	*/	
33		window.location.replace ("/lib/Search?q=" + document.getElementById('SiteSearch').value);
34		//alert("after replace :" + window.location.replace);
35	}
36}
37
38function gotoSpecialistsResultsPage()
39{
40/*		document.write("specialty :" + document.getElementById("Specialty").value);
41		document.write("search :" + document.getElementById("Search").value);*/
42		window.location.replace ("Specialists/SpecialistsResults?Specialty=" + document.getElementById("maincontent_0_othercontent_0_Specialty").value + "&Search=" + document.getElementById("Search").value + "&HospitalID=" + document.getElementById("HospitalID").value);
43/*	if ( document.getElementById("Specialty").value != "" || document.getElementById("Search").value != "" )
44	{
45
46/*		e = window.event;
47		try {
48			window.location.replace("/lib/Search?Sitesearch=" + document.getElementById('SiteSearch').value);
49		} 
50		catch(e) {
51			window.location = "/lib/Search?Sitesearch=" + document.getElementById('SiteSearch').value;
52		}
53	*/	
54/*		window.location.replace ("/sitecore/content/SGP/Home/Our Doctors/Specialists/test?Specialty=" + document.getElementById('Specialty').value + "&Search=" + document.getElementById("Search").value);
55		//alert("after replace :" + window.location.replace);
56	}*/
57}
58
59function gotoSearchAllSpecialists()
60{
61		window.location.replace ("Specialists/SpecialistsResults?Specialty=" + document.getElementById("maincontent_0_othercontent_0_Specialty").value + "&HospitalName=" + document.getElementById("maincontent_0_othercontent_0_HospitalName").value + "&Search=" + document.getElementById("Search").value);
62
63}
64
65/* ***********************
66** Photo Gallery
67** ***********************
68*/
69$(document).ready(function(){        
70	$('li img').on('click',function(){
71		var src = $(this).attr('src');
72		var img = '<img src="' + src + '" class="img-responsive"/>';
73		
74		//start of new code new code
75		var index = $(this).parent('li').index();   
76		
77		var html = '';
78		html += img;                
79		html += '<div style="height:25px;clear:both;display:block;">';
80		html += '<a class="controls next" href="'+ (index+2) + '">next &raquo;</a>';
81		html += '<a class="controls previous" href="' + (index) + '">&laquo; prev</a>';
82		html += '</div>';
83		
84		$('#myModal').modal();
85		$('#myModal').on('shown.bs.modal', function(){
86			$('#myModal .modal-body').html(html);
87			//new code
88			$('a.controls').trigger('click');
89		})
90		$('#myModal').on('hidden.bs.modal', function(){
91			$('#myModal .modal-body').html('');
92		});
93		
94   });
95
96})
97
98//new code
99$(document).on('click', 'a.controls', function(){
100	var index = $(this).attr('href');
101	var src = $('ul.row li:nth-child('+ index +') img').attr('src');             
102	
103	$('.modal-body img').attr('src', src);
104	
105	var newPrevIndex = parseInt(index) - 1; 
106	var newNextIndex = parseInt(newPrevIndex) + 2; 
107	
108	if($(this).hasClass('previous')){               
109		$(this).attr('href', newPrevIndex); 
110		$('a.next').attr('href', newNextIndex);
111	}else{
112		$(this).attr('href', newNextIndex); 
113		$('a.previous').attr('href', newPrevIndex);
114	}
115	
116	var total = $('ul.row li').length + 1; 
117	//hide next button
118	if(total === newNextIndex){
119		$('a.next').hide();
120	}else{
121		$('a.next').show()
122	}            
123	//hide previous button
124	if(newPrevIndex === 0){
125		$('a.previous').hide();
126	}else{
127		$('a.previous').show()
128	}
129		
130	return false;
131});
132//iframe resize based on content
133  function iframeLoaded() {
134      var iFrameID = document.getElementById('idIframe');
135      if(iFrameID) {
136            // here you can make the height, I delete it first, then I make it again
137            iFrameID.height = "";
138            iFrameID.height = iFrameID.contentWindow.document.body.scrollHeight + "px";
139      }   
140  }
141 
142//sitemap scroll to bottom
143  	function scrollToBottom() {
144		$('html, body').animate({scrollTop:$(document).height()}, 'slow');
145	}
146//Image load and swap
147function MM_preloadImages() { //v3.0
148  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
149    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
150    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
151}
152
153function MM_swapImgRestore() { //v3.0
154  var i,x,a=document.MM_sr;
154 for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
155}
156
157function MM_findObj(n, d) { //v4.01
158  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
159    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
160  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
161  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
162  if(!x && d.getElementById) x=d.getElementById(n); return x;
163}
164
165function MM_swapImage() { //v3.0
166  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
167   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
168}
169function MM_showHideLayers() { //v9.0
170  var i,p,v,obj,args=MM_showHideLayers.arguments;
171  for (i=0; i<(args.length-2); i+=3) 
172  with (document) if (getElementById && ((obj=getElementById(args[i]))!=null)) { v=args[i+2];
173    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
174    obj.visibility=v; }
175}
176//Open in sized window
177function MM_openBrWindow(theURL,winName,features) { //v2.0
178  window.open(theURL,winName,features);
179}

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.