


function newWin(link) {
  var winFeatures = "scrollbars=yes,width=650,height=450,directories=no,status=yes,resizable=yes,menubar=yes,toolbar=yes,location=yes";
  var bookWindow = window.open(link, "popup", winFeatures);
  bookWindow.focus();
  var doTrack=false;
  var isDoc=link.match(/\.(?:pdf)($|\&|\?)/);
  var lnkDesc
	if (link.charAt(0)== "/") {
           if (isDoc) { 
		lnkDesc=link; 
		doTrack=true;
	   }
 	}
	else
	{
	   if (parseUri(link).host == "www.ilo.org") {
		if (isDoc) {
			lnkDesc=parseUri(link).path;
			doTrack=true;
			}
		}
	   else 
		{
		lnkDesc="/external/" + link;
		doTrack=true;
 		}
	}
 try {
	 if (doTrack) pageTracker._trackPageview(lnkDesc);		
 }
 catch(e){
		 }

}

function newBigWin(link) {
  var winFeatures = "scrollbars=yes,width=780,height=580,directories=no,status=yes,resizable=yes,menubar=yes,toolbar=yes,location=yes";
  var bookWindow = window.open(link, "popup", winFeatures);
  bookWindow.focus();
}



/*
	parseUri 1.2.1
	(c) 2007 Steven Levithan <stevenlevithan.com>
	MIT License
*/

function parseUri (str) {
	var	o   = parseUri.options,
		m   = o.parser[o.strictMode ? "strict" : "loose"].exec(str),
		uri = {},
		i   = 14;

	while (i--) uri[o.key[i]] = m[i] || "";

	uri[o.q.name] = {};
	uri[o.key[12]].replace(o.q.parser, function ($0, $1, $2) {
		if ($1) uri[o.q.name][$1] = $2;
	});

	return uri;
};

parseUri.options = {
	strictMode: false,
	key: ["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],
	q:   {
		name:   "queryKey",
		parser: /(?:^|&)([^&=]*)=?([^&]*)/g
	},
	parser: {
		strict: /^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*):?([^:@]*))?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,
		loose:  /^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*):?([^:@]*))?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/
	}
};

