var version = "v0.1";



function CheckLib(){



window.status = "jlib " + version + "loaded";



}



var intervalID;

var id = "clipnaam";



var NS4 = (document.layers) ? 1 : 0;

var IE4 = (document.all) ? 1 : 0;

var IE6 = (document.getElementById) ? 1 : 0;



function setsize(newwidth, newheight, element)

{

	element.width = Math.round(newwidth);

	element.height = Math.round(newheight);

}



function resize(targetwidth, targetheight, element)

{

	// process obj

	if(IE6){

		var objectwidth = element.width.split('px');

		var objectheight = element.height.split('px');

		var objectwidth = objectwidth[0];

		var objectheight = objectheight[0];

	}else{

		var objectwidth = element.width;

		var objectheight = element.height;

	};

	// init obj

	if( (objectwidth == "") || (objectwidth == "undefined") ){

		setsize(152, 573, element)

	}else{

		var currentwidth = Math.round(objectwidth);

		var currentheight = Math.round(objectheight);

		var widthspeed = Math.round(((targetwidth-currentwidth)/2));

		var heightspeed = Math.round(((targetheight-currentheight)/2));

		// process speed

		if (widthspeed<0) {

			widthspeed = 0-(Math.round(((targetwidth-currentwidth)/2)));

		}

		if (heightspeed<0) {

			heightspeed = 0-(Math.round(((targetheight-currentheight)/2)));

		}

		if (widthspeed<=1) {

			widthspeed = 1;

		}

		if (heightspeed<=1) {

			heightspeed = 1;

		}

		// process width

		if (currentwidth<targetwidth) {

			thewidth = "failed";

			element.width = Math.round((currentwidth+widthspeed));

		}else if (currentwidth>targetwidth) {

			thewidth = "failed";

			element.width = Math.round((currentwidth-widthspeed));

		}else if (currentwidth==targetwidth) {

			thewidth = "achieved";

			element.width = currentwidth;

		}else{

			thewidth = "failed";

		};

		// process height

		if (currentheight<targetheight) {

			theheight = "failed";

			element.height = Math.round((currentheight+heightspeed));

		}else if (currentheight>targetheight) {

			theheight = "failed";

			element.height = Math.round((currentheight-heightspeed));

		}else if (currentheight==targetheight) {

			theheight = "achieved";

			element.height = currentheight;

		}else {

			theheight = "failed";

		};

		// check is we're there, if so clear the interval

		if ( (thewidth == "achieved") && (theheight == "achieved") ){

			clearInterval(intervalID);

		};

	};

}

function resizer(targetwidth, targetheight)

{

	if(NS4){

		element = document[id];

	}else if(IE4){

		element = document.all[id];

	}else if(IE6){

		element = document.getElementById(id).style;

	}else{

		element = document.getElementById(id).style;

	};

	clearInterval(intervalID);

	intervalID = setInterval("resize("+targetwidth+", "+targetheight+", element)", 40);

}

function setBackgroundColor(id,bgcolor){
    document.getElementById(id).style.backgroundColor =  bgcolor  ; 
}

function insertSWF(insertSWF_root, insertSWF_file, insertSWF_name, insertSWF_width, insertSWF_height, insertSWF_string){



  var insertSWF_FileRoot = insertSWF_root;

  var insertSWF_url = location.href;

  var insertSWF_SiteRoot = insertSWF_url.substring(0,insertSWF_url.lastIndexOf("/"));

  

  var insertSWF_str = insertSWF_file;

  var insertSWF_pos = insertSWF_str.indexOf("?")

  

  if(insertSWF_FileRoot != null){

      

	  if (insertSWF_FileRoot == "@@swfroot@@"){

        var insertSWF_FileRoot = "";

      }else{

		 if (insertSWF_FileRoot.charAt((insertSWF_FileRoot.length-1)) == "/"){

           var insertSWF_FileRoot = insertSWF_FileRoot;

         }else{

           var insertSWF_FileRoot = insertSWF_FileRoot+"/";

         }; 

	  };

  }else{

        var insertSWF_FileRoot = "";

  };

  

  if (insertSWF_pos >= 0){

      var insertSWF_bind = "&";

  }else{

      var insertSWF_bind = "?";

  };

  if(insertSWF_width == null){

      insertSWF_width = "100%";

  }

  if(insertSWF_height == null){

      insertSWF_height = "100%";

  }

  if(insertSWF_string == null){

	  insertSWF_string = "Root="+insertSWF_SiteRoot;

  }else{

      insertSWF_string = insertSWF_string+"&Root="+insertSWF_SiteRoot;

  }

  document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" name="'+insertSWF_name+'" width="'+insertSWF_width+'" height="'+insertSWF_height+'" id="'+insertSWF_name+'">'+

               '  <param name="movie" @@swfroot@@ value="'+insertSWF_FileRoot+insertSWF_file+insertSWF_bind+insertSWF_string+'">'+

               '  <param name="quality" value="high">'+

			   '  <param name="wmode" value="opaque">'+

			   '  <param name=FlashVars value="'+insertSWF_string+'">'+

               '  <embed src="'+insertSWF_FileRoot+insertSWF_file+insertSWF_bind+insertSWF_string+'" name="'+insertSWF_name+'" swLiveConnect=true width="'+insertSWF_width+'" height="'+insertSWF_height+'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash"></embed>'+

               '</object>');

}



function PrintPage(URL,template,w,h,fr){



if (!fr) fr = URL+document.location.search;



else fr = URL+document.frames.item(fr).location.search;



fr = fr + "&template="+template;



day = new Date(); id = day.getTime(); eval("page" + id + " = window.open(fr, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width="+w+",height="+h+"');");



}







function LaunchWin(theURL,winName,features) {



  window.open(theURL,winName,features);



}



function LaunchAlert(msg) {



  alert(msg);



}



function disableRightClick(e)



{



  var message = "Right click disabled";



  



  if(!document.rightClickDisabled)



  {



    if(document.layers) 



    {



      document.captureEvents(Event.MOUSEDOWN);



      document.onmousedown = disableRightClick;



    }



    else document.oncontextmenu = disableRightClick;



    return document.rightClickDisabled = true;



  }



  if(document.layers || (document.getElementById && !document.all))



  {



    if (e.which==2||e.which==3)



    {



      alert(message);



      return false;



    }



  }



  else



  {



    alert(message);



    return false;



  }



}



function simplePreload()



{ 



  var args = simplePreload.arguments;



  document.imageArray = new Array(args.length);



  for(var i=0; i<args.length; i++)



  {



    document.imageArray[i] = new Image;



    document.imageArray[i].src = args[i];



  }



}







var ns4 = document.layers;



var ns6 = document.getElementById && !document.all;



var ie4 = document.all;



offsetX = 0;



offsetY = 20;



var RolloverBoxSTYLE="";



var boxwidth = 0;



var boxheight = 0;



function RolloverBox(msg, fg, bg, w, h)



{ 



  



  if(ns4||ns6||ie4)



  {



    if(ns4) RolloverBoxSTYLE = document.RolloverBoxLayer;



    else if(ns6) RolloverBoxSTYLE = document.getElementById("RolloverBoxLayer").style;



    else if(ie4) RolloverBoxSTYLE = document.all.RolloverBoxLayer.style;



    if(ns4) document.captureEvents(Event.MOUSEMOVE);



    else



    {



      RolloverBoxSTYLE.visibility = "visible";



      RolloverBoxSTYLE.display = "none";



    }



	document.onmousemove = moveToMouseLoc;



  }



  if(RolloverBox.arguments.length < 1) // hide



  {



    if(ns4) RolloverBoxSTYLE.visibility = "hidden";



    else RolloverBoxSTYLE.display = "none";



  }



  else // show



  {



    if(!fg) fg = "#000000";



    if(!bg) bg = "#FFFFFF";



	



    var content =



    '<table id=RollOverTable border="0" cellspacing="0" cellpadding="1" bgcolor="' + fg + '" width=' + w + ' height=' + h + '><td>' +



    '<table width="100%" height="100%" border="0" cellspacing="0" cellpadding="2" bgcolor="' + bg + 



    '"><td align="left" valign="top"><font face="sans-serif" color="' + fg +



    '" size="-2">' + msg + '</font></td></table></td></table>';



    if(ns4)



    {



      RolloverBoxSTYLE.document.write(content);



      RolloverBoxSTYLE.document.close();



      RolloverBoxSTYLE.visibility = "visible";



    }



    if(ns6)



    {



      document.getElementById("RolloverBoxLayer").innerHTML = content;



      RolloverBoxSTYLE.display='block'



    }



    if(ie4)



    {



      document.all("RolloverBoxLayer").innerHTML=content;



      RolloverBoxSTYLE.display='block'



    }



  }



}



function moveToMouseLoc(e)



{



  boxwidth = 200;



  boxheight = 50;



  docwidth = document.body.clientWidth; 



  docheight = document.body.clientHeight;



  if(ns4||ns6)



  {



    x = e.pageX;



    y = e.pageY;



  }



  else



  {



    x = event.x + document.body.scrollLeft;



    y = event.y + document.body.scrollTop;



  }



  



  if( (x + boxwidth) > docwidth ){



   doX = (x - offsetX)-boxwidth;



   doY = (y + offsetY);



   }else if( (y + boxheight) > docheight ){



   doX = (x + offsetX);



   doY = (y - offsetY)-boxheight;



   }else{



   doX = (x + offsetX);



   doY = (y + offsetY);



   }



   RolloverBoxSTYLE.left = doX;



   RolloverBoxSTYLE.top = doY;



  return true;



}











function setInnerHTML(value, obj)



{



var d=(ie4)?document.all[obj]:document.getElementById(obj);



d.innerHTML = value;



}



function addslashes(ch) {



   ch = ch.replace(/\\/g,"\\\\");



   ch = ch.replace(/\'/g,"\\'"); 



   ch = ch.replace(/\"/g,"\\\"");



   return ch



}







PositionX = 3000;



PositionY = 3000;







defaultWidth = 10;



defaultHeight = 10;







var AutoClose = true;







var isIE = document.all;



var isNN = document.layers;



var optNN='scrollbars=no,width='+defaultWidth+',height='+defaultHeight+',left='+PositionX+',top='+PositionY; 



var optIE='scrollbars=no,width=150,height=100,left='+PositionX+',top='+PositionY;







function AutoPop(imageURL,imageTitle){



if (isNN){imgWin=window.open('about :blank','',optNN);}



if (isIE){imgWin=window.open('about :blank','',optIE);}







with (imgWin.document){



writeln('<html><head><title>Loading...</title><style>body{margin:0px;}</style>');



writeln('<sc'+'ript>');







writeln('var isNN,isIE;');



writeln('if (parseInt(navigator.appVersion.charAt(0))>=4){');



writeln('isNN=(navigator.appName==\"Netscape\")?1:0;');



writeln('isIE=(navigator.appName.indexOf(\"Microsoft\")!=-1)?1:0;}');







writeln('function reSizeToImage(){');







writeln('if (isIE){');



writeln('window.resizeTo(100,100);');



writeln('width=100-(document.body.clientWidth-document.images[0].width);');



writeln('height=100-(document.body.clientHeight-document.images[0].height);');



writeln('window.resizeTo(width,height);}');







writeln('if (isNN){'); 



writeln('window.innerWidth=document.images[\"AutoPopImage\"].width;')



writeln('window.innerHeight=document.images[\"AutoPopImage\"].height;}}');







writeln('window.moveTo(screen.width/3,screen.height/3);');







writeln('function doTitle(){document.title=\"'+imageTitle+'\";}')







writeln('</sc'+'ript>');







if (!AutoClose)



writeln('</head><body bgcolor=FFFFFF scroll=\"no\" onload=\"reSizeToImage();doTitle();self.focus()\">')



else



writeln('</head><body bgcolor=FFFFFF scroll=\"no\" onload=\"reSizeToImage();doTitle();self.focus()\" onblur=\"self.close()\">');



writeln('<img name=\"AutoPopImage\" src='+imageURL+' style=\"display:block\"></body></html>');







close(); 



}}

function AutoPopup(imageURL,imageTitle,siteURL){



if (isNN){imgWin=window.open('about :blank','',optNN);}



if (isIE){imgWin=window.open('a	bout :blank','',optIE);}







with (imgWin.document){



writeln('<html><head><title>Loading...</title><style>body{margin:0px;}</style>');



writeln('<sc'+'ript>');







writeln('var isNN,isIE;');



writeln('if (parseInt(navigator.appVersion.charAt(0))>=4){');



writeln('isNN=(navigator.appName==\"Netscape\")?1:0;');



writeln('isIE=(navigator.appName.indexOf(\"Microsoft\")!=-1)?1:0;}');







writeln('function reSizeToImage(){');







writeln('if (isIE){');



writeln('window.resizeTo(100,100);');



writeln('width=100-(document.body.clientWidth-document.images[0].width);');



writeln('height=100-(document.body.clientHeight-document.images[0].height);');



writeln('window.resizeTo(width,height);}');







writeln('if (isNN){'); 



writeln('window.innerWidth=document.images[\"AutoPopImage\"].width;')



writeln('window.innerHeight=document.images[\"AutoPopImage\"].height;}}');







writeln('window.moveTo(screen.width/3,screen.height/3);');







writeln('function doTitle(){document.title=\"'+imageTitle+'\";}')







writeln('</sc'+'ript>');







if (!AutoClose)



writeln('</head><body bgcolor=FFFFFF scroll=\"no\" onload=\"reSizeToImage();doTitle();self.focus()\">')



else



writeln('</head><body bgcolor=FFFFFF scroll=\"no\" onload=\"reSizeToImage();doTitle();self.focus()\">');



writeln('<a href='+siteURL+' target=\"_blank\"><img name=\"AutoPopImage\" src='+imageURL+' style=\"display:block\" border=\"0\"></a></body></html>');







close(); 



}}

function FullScreen(targeturl){



window.open(targeturl,"","fullscreen,scrollbars")



}



function RObj(ea) {



var LS="";var QS=new Object();var un="undefined";var f="function";var n="number";var r="string";var e1="ERROR: Index out of range in\r\nRequest.QueryString";var e2="ERROR: Wrong number of arguments or invalid property assignment\r\nRequest.QueryString";var e3="ERROR: Object doesn't support this property or method\r\nRequest.QueryString.Key"



function Err(arg) {if (ea) alert("Request Object:\r\n"+arg)}



function URID(t) {var d="";if (t) {for (var i=0; i<t.length; ++i) {var c=t.charAt(i);d+=(c=="+" ? " ":c);};};return unescape(d);}



function OL(o) {var l=0;for (var i in o) {if (typeof(o[i])!=f) l++;};return l;}



function AK(key) {var auk=true;for (var u in QS) {if (typeof(QS[u])!=f && u.toString().toLowerCase()==key.toLowerCase()) {auk=false;return u;}};if (auk) {QS[key]=new Object();QS[key].toString=function() {return TS(QS[key])};QS[key].Count=function() {return OL(QS[key])};QS[key].Count.toString=function() {return OL(QS[key]).toString()};QS[key].Item=function(e) {if (typeof(e)==un) return QS[key];else {if (typeof(e)==n) {var a=QS[key][Math.ceil(e)];if (typeof(a)==un) Err(e1 +"(\""+key+"\").Item("+e+")");return a;}else Err("ERROR: Expecting numeric input in\r\nRequest.QueryString(\""+key+"\").Item(\""+e+"\")");}};QS[key].Item.toString=function(e) {if (typeof(e)==un) return QS[key].toString();else {var a=QS[key][e];if (typeof(a)==un) Err(e1+"(\""+key+"\").Item("+e+")");return a.toString();};};QS[key].Key=function(e) {var t=typeof(e);if (t==r) {var a=QS[key][e];return (typeof(a)!=un && a && a.toString() ? e:"");}else Err(e3+"("+(e?e:"")+")");};QS[key].Key.toString=function() {return un};};return key}



function AVTK(key, val) {if (key!="") {var key=AK(key);var l=OL(QS[key]);QS[key][l+1]=val;}}



function TS(o) {var s="";for (var i in o) {var ty=typeof(o[i]);if (ty=="object") s+=TS(o[i]);else if (ty!=f) s+=o[i]+", ";};var l=s.length;if (l>1) return(s.substring(0,l-2));return (s=="" ? un:s);}



function KM(k, o) {var k=k.toLowerCase();for (var u in o) {if (typeof(o[u])!=f && u.toString().toLowerCase()==k) return u;};}



if (window.location && window.location.search) {LS=window.location.search;var l=LS.length;if (l>0) {LS=LS.substring(1,l);var preAmpAt=0;var ampAt=-1;var eqAt=-1;var k=0;var skip=false;for (var i=0; i<l; ++i) {var c=LS.charAt(i);if (LS.charAt(preAmpAt)=="=" || (preAmpAt==0 && i==0 && c=="=")) skip=true;if (c=="=" && eqAt==-1 && !skip) eqAt=i;if (c=="&" && ampAt==-1) {if (eqAt!=-1) ampAt=i;if (skip) preAmpAt=i+1;skip=false;};if (ampAt>eqAt) {AVTK(URID(LS.substring(preAmpAt,eqAt)),URID(LS.substring(eqAt+1,ampAt)));preAmpAt=ampAt+1;eqAt=ampAt=-1;++k;};};if (LS.charAt(preAmpAt)!="=" && (preAmpAt!=0 || i!=0 || c!="=")) {if (preAmpAt!=l) {if (eqAt!=-1) AVTK(URID(LS.substring(preAmpAt,eqAt)),URID(LS.substring(eqAt+1,l)));else if (preAmpAt!=l-1) AVTK(URID(LS.substring(preAmpAt,l)),"");};if (l==1) AVTK(LS.substring(0,1),"");};};};var TC=OL(QS);if (!TC) TC=0



QS.toString=function() {return LS.toString()};QS.Count=function() {return (TC ? TC:0)};QS.Count.toString=function() {return (TC ? TC.toString():"0")};QS.Item=function(e) {if (typeof(e)==un) return LS;else {if (typeof(e)==n) {var e=Math.ceil(e);var c=0;for (var i in QS) {if (typeof(QS[i])!=f && ++c==e) return QS[i];};Err(e1+"().Item("+e+")");}else return QS[KM(e, QS)];};return un;};QS.Item.toString=function() {return LS.toString()};QS.Key=function(e) {var t=typeof(e);if (t==n) {var e=Math.ceil(e);var c=0;for (var i in QS) {if (typeof(QS[i])!=f && ++c==e) return i;}}else if (t==r) {var e=KM(e, QS);var a=QS[e];return (typeof(a)!=un && a && a.toString() ? e:"");}else Err(e2+"().Key("+(e?e:"")+")");Err(e1+"().Item("+e+")");};QS.Key.toString=function() {Err(e2+"().Key");}



this.QueryString=function(k) {if (typeof(k)==un) return QS;else {var k=KM(k, QS);if (typeof(QS[k])==un) {t=new Object();t.Count=function() {return 0};t.Count.toString=function() {return "0"};t.toString=function() {return un};t.Item=function(e) {return un};t.Item.toString=function() {return un};t.Key=function(e) {Err(e3+"("+(e?e:"")+")");};t.Key.toString=function() {return un};return t;}if (typeof(k)==n) return QS.Item(k);else return QS[k];}}



this.QueryString.toString=function() {return LS.toString();};this.QueryString.Count=function() {return (TC ? TC:0)};this.QueryString.Count.toString=function() {return (TC ? TC.toString():"0")};this.QueryString.Item=function(e) {if (typeof(e)==un) return LS.toString();else {if (typeof(e)==n) {var e=Math.ceil(e);var c=0;for (var i in QS) {if (typeof(QS[i])!=f && ++c==e) return QS[i];};Err(e1+".Item("+e+")");}else return QS[KM(e, QS)];}if (typeof(e)==(n)) Err(e1+".Item("+e+")");return un;}



this.QueryString.Item.toString=function() {return LS.toString()};this.QueryString.Key=function(e) {var t=typeof(e);if (t==n) {var e=Math.ceil(e);var c=0;for (var i in QS) {if (typeof(QS[i])=="object" && (++c==e)) {return i;}}}else if (t==r) {var e=KM(e, QS);var a=QS[e];return (typeof(a)!=un && a && a.toString() ? e:"");}else Err(e2+".Key("+(e?e:"")+")");Err(e1+".Item("+e+")");};this.QueryString.Key.toString=function() {Err(e2+".Key");};this.Version=1.1;this.Author="Andrew Urquhart (www.andrewu.co.uk)";}



var Request=new RObj(false);