﻿// JScript File

//Paste this code into an external JavaScript file named: detectPopupBlocker.js  -->

// This script and many more are available free online at


function detectPopupBlocker()
 {
//  var myTest = window.open("about:blank","","directories=no,height=10,width=10,menubar=no,resizable=no,scrollbars=no,status=no,titlebar=no,top=0,location=no");
//  if (!myTest) {
//    alert("It seems you have a popup blocker which is preventing this site from opening. Please check the top of the browser, whether there is a message saying the site has been blocked. You need to allow it.");
//  } else {
//    myTest.close();
    //alert("No popup blocker was detected.");
//}
var x,s=location.href;
	if((x=s.indexOf('#'))>=0)
		{
			s=s.substr(0,x);
                         
		}
	if(s.indexOf('?')>=0)
		{
			s+='&print=1&displaymode=1098';                        
		}
	else
		{
	        if(s.charAt(s.length-1)!='/')
		        {
			        s+='/';
		        }
		            s+='print/1/displaymode/1098/';
	                var rdid=/[\?|&|\/]did[=|\/](\d*)/;
	                var mdid=s.match(rdid);
	                if(mdid!=null&&mdid[1]!='')
		                {
			                var rid=/[\?|&|\/]id[=|\/](\d*)/;var mid=s.match(rid);
			                    if(mid!=null&&mid[1]!='')
				                    {
					                    s=s.replace(mid[1],mdid[1])
				                    }
		                }
                  //alert("It seems you have a popup blocker which is preventing this site from opening. Please check the top of the browser, whether there is a message saying the site has been blocked. You need to allow it.");
     }
}





































