16d15 < 34,122d32 < var httpxml=null; < < function createCORSRequest(method, url) { // thanks to http://jquery-howto.blogspot.com.au/2013/09/jquery-cross-domain-ajax-request.html < try { < var xhr = new XMLHttpRequest(); < if ("withCredentials" in xhr){ < // XHR has 'withCredentials' property only if it supports CORS < xhr.open(method, url, true); < xhr.setRequestHeader('Access-Control-Allow-Origin', '*'); < xhr.setRequestHeader('Access-Control-Allow-Methods', 'GET'); < try { < xhr.overrideMimeType('text/xml'); // unsupported by IE < } catch(e) {} < } else if (typeof XDomainRequest != "undefined"){ // if IE use XDR < xhr = new XDomainRequest(); < xhr.open(method, url); < xhr.setRequestHeader('Access-Control-Allow-Origin', '*'); < xhr.setRequestHeader('Access-Control-Allow-Methods', 'GET'); < try { < xhr.overrideMimeType('text/xml'); // unsupported by IE < } catch(e) {} < } else { < xhr = null; < } < } catch(ee) { < xhr = null; < } < if (!xhr) { < // Feed jQuery JSON < $.getJSON((url.replace('?','&') + "&format=json&jsoncallback=?").replace('&','?'), displayHtml); < } < setTimeout(checkrest, 2000); < return xhr; < } < < function checkrest() { < if (rawhtml == '') { < document.getElementById('myif').src = 'http://www.rjmprogramming.com.au/HTMLCSS/legend_via_map.php?url=' + encodeURIComponent(xrawurl); < } < } < < < function displayHtml(data) { < rawhtml = data; < checkins(); < } < < function changed(othis) { < xrawhtml = othis; < if (!httpxml) ajaxFunction(othis); < if (httpxml) { < //httpxml.open("GET", othis, true); < httpxml.send(null); < } < } < < function stateChanged() { < if (httpxml.readyState == 4) { < if (httpxml.status == 200) { < rawhtml = httpxml.responseText; < checkins(); < } < } < } < < function ajaxFunction(inu) { < //var httpxml; < try { < // Firefox, Opera 8.0+, Safari < httpxml=createCORSRequest( "get", inu); //.replace('//','@@').split('/')[0].replace('@@','//') ); // new XMLHttpRequest(); < httpxml.onreadystatechange=stateChanged; < //alert(95); < } catch (e) { < // Internet Explorer < try { < httpxml=new ActiveXObject("Msxml2.XMLHTTP"); < httpxml.onreadystatechange=stateChanged; < } catch (e) { < try { < httpxml=new ActiveXObject("Microsoft.XMLHTTP"); < httpxml.onreadystatechange=stateChanged; < } catch (e) { < alert("Your browser does not support AJAX!"); < return false; < } < } < } < } < 148d57 < try { 162d70 < } catch(eee) { } 235,237d142 < if (sparer.indexOf('livingroom_corner.') != -1) { < changed(sparer); < } else { 239,242d143 < } < } else if (1 == 2) { < popup = window.open(sparer, '_blank', 'top=30,left=0,width=600,height=800'); < setTimeout(crossdomainiframe,3000); 244d144 < changed(sparer); 245a146 > setTimeout(crossdomainiframe,3000); 463c364 < if (rawurl.indexOf('rjmprogramming.com.au') == -1 && xrawurl.indexOf('/~mkuulma/livingroom_corner.htm') == -1 && rawurl.indexOf('/~mkuulma/livingroom_corner.htm') == -1) { --- > if (rawurl.indexOf('rjmprogramming.com.au') == -1) { 465,466c366 < //if (rawurl.indexOf('/~mkuulma/livingroom_corner.htm') == -1) { < popup=aconto; --- > popup=aconto; 468,469c368 < crossdomainiframe(); < //} --- > crossdomainiframe();