var mes="Right click disabled. Immihelp.com is copyright 1999-2010."; 

function clickIE4(){
if (event.button==2){
alert(mes);
return false;
}
}

function clickNS4(e){
if (document.layers||document.getElementById&&!document.all){
if (e.which==2||e.which==3){
alert(mes);
return false;
}
}
}

if (document.layers){
document.captureEvents(Event.MOUSEDOWN);
document.onmousedown=clickNS4;
}
else if (document.all&&!document.getElementById){
document.onmousedown=clickIE4;
}

document.oncontextmenu=new Function("alert(mes);return false")
 

function printPage()
{
   var usertype=navigator.userAgent.toLowerCase();
 
   if (window.print) 
	 {
     setTimeout('window.print();',200);
   }
   else if (usertype.indexOf("mac") != -1) 
	 {
     alert("Press 'Cmd+p' on your keyboard to print article.");
   }
   else 
	 {
     alert("Press 'Ctrl+p' on your keyboard to print article.")
   }
}

function closeWindow()
{
  window.close()
}

var printCmd = '<br><table width="100%"><tr><td align="right"><input type="submit" name="printSubmit" value=" Print " onClick="printPage()">&nbsp;&nbsp;<input type="submit" name="closeSubmit" value=" Close " onClick="closeWindow()"></td></tr></table>';

function hidePrint() 
{
  if (document.all) 
  {
    document.all.topPrint.innerHTML = "";                
	document.all.bottomPrint.innerHTML = "";
  }
}

function showPrint() 
{
  if (document.all) 
  { 
    document.all.topPrint.innerHTML = printCmd;
	document.all.bottomPrint.innerHTML = printCmd;
  }
}

function printerFriendly()
{    				    
  window.open("/script/printer.php?page=" 
     + escape(document.URL)
     + "&style=/style.css&lnk=1",'so','toolbar=0,scrollbars=1,location=0,status=1,menubars=0,resizable=1,width=700,height=550');
    
  return false;
}


function disableSelection(target)
{
if (typeof target.onselectstart!="undefined") //IE route
	target.onselectstart=function(){return false}
else if (typeof target.style.MozUserSelect!="undefined") //Firefox route
	target.style.MozUserSelect="none"
else //All other route (ie: Opera)
	target.onmousedown=function(){return false}
target.style.cursor = "default"
}

function popUpExplanation(page) 
{
  window.open(page,'so','toolbar=0,scrollbars=1,location=0,status=1,menubars=0,resizable=1,width=550,height=400');
}

function popUpLarge(page)
{
  window.open(page,'so','toolbar=0,scrollbars=1,location=0,status=1,menubars=0,resizable=1,width=700,height=550');
}

function popUpFull(page)
{
  window.open(page,'so','toolbar=0,scrollbars=1,location=0,status=1,menubars=0,resizable=1');
}

/**************** Browser Selection JavaScript ************/
/*
IE6
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; GTB6.5; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; MS-RTC LM 8) 

IE 8 
Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; GTB6.3; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)

FireFox
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.6) Gecko/20100625 Firefox/3.6.6 (.NET CLR 3.5.30729)

Google Chrome
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/533.4 (KHTML, like Gecko) Chrome/5.0.375.99 Safari/533.4

Safari
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/531.9 (KHTML, like Gecko) Version/4.0.3 Safari/531.9.1
*/
var isBrowserIE = false, browserIEVersion = 0;
var isBrowserFireFox = false, browserFFVersion = 0;
var isBrowserOpera = false, browserOperaVersion = 0; 
var isBrowserChrome = false, browserChromeVersion = 0;
var isBrowserSafari = false, browserSafariVersion = 0;

//test for MSIE x.x;
if (/MSIE (\d+\.\d+);/.test(navigator.userAgent))
{ 
 isBrowserIE = true; 
 browserIEVersion = new Number(RegExp.$1) // capture x.x portion and store as a number, 8, 7, 6, 5
}

//test for Firefox/x.x or Firefox x.x (ignoring remaining digits);
else if (/Firefox[\/\s](\d+\.\d+)/.test(navigator.userAgent))
{ 
  isBrowserFireFox = true;
  browserFFVersion = new Number(RegExp.$1) // capture x.x portion and store as a number, 3, 2, 1
}

//test for Opera/x.x or Opera x.x (ignoring remaining decimal places);
else if (/Opera[\/\s](\d+\.\d+)/.test(navigator.userAgent))
{
  isBrowserOpera = true;
  browserOperaVersion = new Number(RegExp.$1) // capture x.x portion and store as a number, 10, 9, 8, 7
}

//test for Chrome/x.x (ignoring remaining digits);
else if (/Chrome[\/\s](\d+\.\d+)/.test(navigator.userAgent))
{ 
  isBrowserChrome = true;
  browserChromeVersion = new Number(RegExp.$1) // capture x.x portion and store as a number, 3, 2, 1
}

//test for Safari (ignoring remaining digits);
else if (/Safari[\/\s](\d+\.\d+)/.test(navigator.userAgent))
{ 
  isBrowserSafari = true;
  if (/Version[\/\s](\d+\.\d+)/.test(navigator.userAgent))
  {  
    browserSafariVersion = new Number(RegExp.$1) // capture x.x portion and store as a number, 3, 2, 1
  }	
}
/**************** End - Browser Selection JavaScript ************/

/******************* JavaScript Code for Browser Specific CSS ***************/
/*
CSS Browser Selector v0.3.5 (Feb 05, 2010)
Rafael Lima (http://rafael.adm.br)
http://rafael.adm.br/css_browser_selector
License: http://creativecommons.org/licenses/by/2.5/
Contributors: http://rafael.adm.br/css_browser_selector#contributors
*/
function css_browser_selector(u){var ua = u.toLowerCase(),is=function(t){return ua.indexOf(t)>-1;},g='gecko',w='webkit',s='safari',o='opera',h=document.documentElement,b=[(!(/opera|webtv/i.test(ua))&&/msie\s(\d)/.test(ua))?('ie ie'+RegExp.$1):is('firefox/2')?g+' ff2':is('firefox/3.5')?g+' ff3 ff3_5':is('firefox/3')?g+' ff3':is('gecko/')?g:is('opera')?o+(/version\/(\d+)/.test(ua)?' '+o+RegExp.$1:(/opera(\s|\/)(\d+)/.test(ua)?' '+o+RegExp.$2:'')):is('konqueror')?'konqueror':is('chrome')?w+' chrome':is('iron')?w+' iron':is('applewebkit/')?w+' '+s+(/version\/(\d+)/.test(ua)?' '+s+RegExp.$1:''):is('mozilla/')?g:'',is('j2me')?'mobile':is('iphone')?'iphone':is('ipod')?'ipod':is('mac')?'mac':is('darwin')?'mac':is('webtv')?'webtv':is('win')?'win':is('freebsd')?'freebsd':(is('x11')||is('linux'))?'linux':'','js']; c = b.join(' '); h.className += ' '+c; return c;}; css_browser_selector(navigator.userAgent);
/******************* End - JavaScript Code for Browser Specific CSS ***************/

