<!-- SCRIPTS FOR THIS PAGE ARE DEVELOPED BY SVEACON CONSULTING -->
<!--                     WWW.SVEACON.SE                        -->

<!-- DHTML WINDOW FOR POP-UP PAGE -->

<!--
var dragapproved=false;
var minrestore=1;
var iniwidth=730;
var iniheight=500;
var mrwidth=640;
var mrheight=460;
var minwidth=400; // width of minimized window
var xbottom=400;  // x coordinate for minimized window
var ybottom=20;   // y coordinate for minimized window
var ie5=document.all&&document.getElementById;
var ns6=document.getElementById&&!document.all;

function iecompattest(){
	return (document.compatMode!="BackCompat")? document.documentElement : document.body;
}

function drag_drop(e){
	if (ie5&&dragapproved&&event.button==1){
		with(document.getElementById("dwindow").style){
			left=tempx+event.clientX-offsetx;
			top=tempy+event.clientY-offsety;
		}
	}
	else if (ns6&&dragapproved){
		with(document.getElementById("dwindow").style){
			left=tempx+e.clientX-offsetx;
			top=tempy+e.clientY-offsety;
		}
	}
}

function initializedrag(e){
	offsetx=ie5? event.clientX : e.clientX;
	offsety=ie5? event.clientY : e.clientY;
	document.getElementById("dwindowcontent").style.display="none"; //extra
	tempx=parseInt(document.getElementById("dwindow").style.left);
	tempy=parseInt(document.getElementById("dwindow").style.top);
	dragapproved=true;
	document.getElementById("dwindow").onmousemove=drag_drop;
}

function loadwindow(url,w,h,winTitle){
	winLoader(winTitle);
	parentWidth=ns6? window.innerWidth-20 : iecompattest().clientWidth;
	parentHeight=ns6? window.innerHeight-20 : iecompattest().clientHeight;
	inix=ie5? (parentWidth-w)/2+6 : (parentWidth-w)/2+16;                   // x coordinate for the new window
	// iniy=Math.max(20,(parentHeight-h)/2-80);                                // y coordinate for the new window
	iniy=20;
	with(document.getElementById("dwindow").style){
		display="";
		width=w;
		height=h;
		left=ns6? window.pageXOffset+inix : iecompattest().scrollLeft+inix;
		top=ns6? window.pageYOffset+iniy : iecompattest().scrollTop+iniy;
	}
	document.getElementById("cframe").src=url;
	document.getElementById("cframe").width=ie5? w : w-4; // corrects for the differences between IE and NS in counting the frameborder width (2px)
}

function maximize(){
	if (minrestore==0){
		minrestore=1; //maximize window
		document.getElementById("maxname").setAttribute("src","images/restore.gif");
		with(document.getElementById("dwindow").style){
			width=ns6? window.innerWidth-20 : iecompattest().clientWidth;
			height=ns6? window.innerHeight-20 : iecompattest().clientHeight;
			left=ns6? window.pageXOffset : iecompattest().scrollLeft;
			top=ns6? window.pageYOffset : iecompattest().scrollTop;
		}
		// the next line corrects for the differences between IE and NS in counting the frameborder width (2px):
		document.getElementById("cframe").width=ie5? iecompattest().clientWidth : window.innerWidth-24; 
	}else{
		minrestore=0; //restore window
		document.getElementById("maxname").setAttribute("src","images/max.gif");
		parentWidth=ns6? window.innerWidth-20 : iecompattest().clientWidth;
		parentHeight=ns6? window.innerHeight-20 : iecompattest().clientHeight;
		mrx=(parentWidth-mrwidth)/2;                          // x coordinate for the new window
		mry=Math.max(40,(parentHeight-mrheight)/2-80);	      // y coordinate for the new window
		with(document.getElementById("dwindow").style){
			width=mrwidth;
			height=mrheight;
			left=ns6? window.pageXOffset+mrx : iecompattest().scrollLeft+mrx;
			top=ns6? window.pageYOffset+mry : iecompattest().scrollTop+mry;
		}
		document.getElementById("cframe").width=ie5? mrwidth : mrwidth-4; // corrects for the differences between IE and NS in counting the frameborder width (2px)
	}
}

function closeit(){
	document.getElementById("dwindow").style.display="none";
}

function stopdrag(){
	dragapproved=false;
	document.getElementById("dwindow").onmousemove=null;
	document.getElementById("dwindowcontent").style.display=""; //extra
}

function minimize () {
	with(document.getElementById("dwindow").style){
		top=ns6? window.innerHeight-20-ybottom : iecompattest().clientHeight-ybottom;
		left=ns6? window.innerWidth-20-xbottom : iecompattest().clientWidth-minwidth;
		width=minwidth;
		height=14;  // size of restore.gif, min.gif and max.gif images
	}
	document.getElementById("dwindowcontent").style.display="none";
}

function winLoader(winTitle) {
	document.getElementById("panel").innerHTML='<table width=100% cellspacing=0 cellpadding=0 border=1>'
	    +'<tr><td align=center bgcolor=#00105A style="cursor:default; filter:progid:DXImageTransform.Microsoft.Gradient(GradientType=1, StartColorStr=#102070, EndColorStr=#A0CAEF)">'
	    +'<font class=10V face="arial, helvetica, verdana" color="#FFFFFF" size=2><b>'+winTitle+'</b></font></td>'
	    +'<td width=48 align=left bgcolor=#A0CAEF style="cursor:default;"><img src="images/min.gif" id="minname" onClick="minimize()" border=0 alt="Minimize">'
	    +'<img src="images/max.gif" id="maxname" onClick="maximize()" border=0 alt="Resize">'
	    +'<img src="images/close.gif" onClick="closeit()" name="closeimg" border=0 alt="Close"></td></tr></table>';
}
//-->

<!-- END OF DHTML WINDOW FOR POP-UP PAGE -->

<!--
var txtLength=14; // The number of characters in the line to be coloured

/* Set colour value increments (decimal values) */
var offset_r=new Array(); 
var offset_g=new Array(); 
var offset_b=new Array();
for (var i=1;i<=txtLength;i++) {
	offset_r[i]=7; offset_g[i]=5; offset_b[i]=3;
}

/* name the span(s) we want to change the colour of */
var colourText=new Array();
for (var i=1;i<=txtLength;i++) {
	// Span id's are colourText01, colourText02, ... , colourText99.
	colourText[i] = (i<10)? "colourText0"+i : "colourText"+i;
}

function getObject() {
	o=new Array();
	if(document.all){
		for(var i=1;i<=txtLength;i++) {
			o[i] = document.all[colourText[i]];
		}
	}else if(document.getElementById){
		for(var i=1;i<=txtLength;i++) {
			o[i] = document.getElementById(colourText[i]);
		}
	}else if(document.layers){
		for(var i=1;i<=txtLength;i++) {
			o[i] = document.layers[colourText[i]];
		}
	}
	return o;
}

var iStart=0;
var u=0;
function unrollText() {
// Unroll the title
	iStart++;
	o = new getObject();
	if (document.all || document.getElementById) o[iStart].style.visibility = "visible";
	if (document.layers) o[iStart].visibility = "visible";
	if(iStart<txtLength){
		u = setTimeout("unrollText()",30);
	}else{
		clearTimeout(u);
	}
}

function colourIt(hexColour){
	o=new getObject();
	for(var i=1;i<=txtLength;i++) {
		o[i].style.color = hexColour[i];
	}
}

function initColoring() {
	if (document.layers && !document.all && !document.getElementById) return; // since coloring cannot be done in NN4
	/* Create currect RGB colour value settings (number between 0 and 255) */
	rc=new Array();
	gc=new Array();
	bc=new Array();
	for (var i=1;i<=txtLength;i++) {
		rc[i]=200-10*(i-1); gc[i]=120-5*(i-1); bc[i]=0;
	}
	/* call the loop function */	
	setColour();	
}

function setColour() {
	for (var i=1;i<=txtLength;i++) {
		rc[i]+=offset_r[i]
		if (rc[i]>255) {
			rc[i]=255; offset_r[i]=-offset_r[i];
		}
		if (rc[i]<50) {
			rc[i]=50; offset_r[i]=-offset_r[i];
		}
		gc[i]+=offset_g[i]
		if (gc[i]>127) {
			gc[i]=127; offset_g[i]=-offset_g[i];
		}
		if (gc[i]<0) {
			gc[i]=0; offset_g[i]=-offset_g[i];
		}
		bc[i]+=offset_b[i]
		if (bc[i]>255) {
			bc[i]=255; offset_b[i]=-offset_b[i];
		}
		if (bc[i]<0) {
			bc[i]=0; offset_b[i]=-offset_b[i];
		}
	}

 	/* Convert the current colour values to hex */	
	base=16;
	hexr=new Array();
	hexg=new Array();
	hexb=new Array();
	for (var i=1;i<=txtLength;i++) {
		hexr[i]=convDecTo(rc[i],base);
		hexg[i]=convDecTo(gc[i],base);
		hexb[i]=convDecTo(bc[i],base);
	}

	/* Create the colour hex string */ 
	hexColour=new Array();
	for (var i=1;i<=txtLength;i++) hexColour[i]=[hexr[i]]+[hexg[i]]+[hexb[i]];

	/* Now colour the span(s) */
	colourIt(hexColour);

	/* back round we go... */
  	setTimeout("setColour()", 50);
}

function convDecTo(i,base){
	if(i>255){
		return('FF'); 
	   }
	else if(i < 0 ){
		return('00');
	}else{
		num=parseInt(i);
		num=num.toString(base);
		if(i<base){
			num=("0"+num);
		}
		return num;
	}
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
	var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
	if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
	d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function showObject(obj){
	if(document.layers){document.layers[obj].visibility="visible";}
	if(document.all){document.all[obj].style.visibility="visible";}
	if(!document.all && document.getElementById){document.getElementById(obj).style.visibility="visible";}
}

function hideObject(obj){
	if(document.layers){document.layers[obj].visibility="hidden";}
	if(document.all){document.all[obj].style.visibility="hidden";}
	if(!document.all && document.getElementById){document.getElementById(obj).style.visibility="hidden";}
}

<!-- POP-DOWN MENU -->

<!--

function hidePopupMenuTable(obj)
{
	if(obj == -1)	{
		for(i=1;i<=6;i++)
			document.getElementById("PopupMenuTable"+i).style.display='none';
	}
	else
		document.getElementById("PopupMenuTable"+obj).style.display='none';
}

function showPopupMenuTable(obj){
	document.getElementById("PopupMenuTable"+obj).style.display='';
}
function highlightText(obj){
	obj.style.color="#660000";
}
function dimText(obj){
	obj.style.color="#FFFFFF";
}

//-->

<!-- NEW WINDOW -->

<!--
function newWin(htmDoc,w,h) {
	var x=0, y=0;
	var scrWidth=screen.width;
	var scrHeight=screen.height;

	if (scrHeight>=600 && scrWidth>=800) {
		var x=(scrWidth-w)/2;
		var y=(scrHeight-h)/2;
	}

	var winFeatures = "toolbar=no,menubar=no,resizable=no,status=no,width=" + w + ",height=" + h;
	winFeatures += ",screenX=" + x + ",left=" + x + ",screenY=" + y + ",top=" + y; // center the window (cover both IE and Netscape by specifying two sets of parameters)

	return window.open(htmDoc, '', winFeatures);
}
//-->


<!-- FADING IMAGE -->

<!--
imgFadeObjects = new Object();
imgFadeTimers = new Object();

function imgFade(theObject, newOpacity, dTime, dOpacity) {
// theObject 	- image to be faded (actual object, not name);
// newOpacity 	- desired final opacity, 0 (transparent) to 100 (solid)
// dTime   	- time in milliseconds between trasparency changes
// dOpacity  	- percent of transparency change each time

	DOM = document.all || document.getElementById;
	if (!DOM) return;

	if (theObject.filters) {

		/* MSIE section */

		if (theObject != "[object]") {  
			setTimeout("imgFade(" + theObject + "," + newOpacity + "," + dTime + "," + dOpacity + ")", 0); // initialize
			return;
		}

		clearTimeout(imgFadeTimers[theObject.sourceIndex]);

		diff = newOpacity - theObject.filters.item("DXImageTransform.Microsoft.Alpha").opacity;
		direction = (diff < 0) ? -1 : 1;
		dOpacity = Math.min(direction*diff,dOpacity);

		theObject.filters.item("DXImageTransform.Microsoft.Alpha").opacity+=direction*dOpacity;

		if (theObject.filters.item("DXImageTransform.Microsoft.Alpha").opacity != newOpacity) {
			imgFadeObjects[theObject.sourceIndex]=theObject;
			imgFadeTimers[theObject.sourceIndex]=setTimeout("imgFade(imgFadeObjects[" + theObject.sourceIndex + "]," + newOpacity + "," + dTime + "," + dOpacity + ")", dTime);
		}
	
	} else if (theObject.style.MozOpacity) {
	
		/* Netscape section */

		diff = newOpacity - 100*theObject.style.MozOpacity;
		if (diff != 0) theObject.style.MozOpacity = newOpacity/100;
		else return;
	}
}
//-->
