<!--
window.defaultStatus = " ";

function IMW_tDiv(idx,d,qty) {
	var track;
	var divid;
	for(i=0; i<qty; i++) {
		try {
			divid = idx+(i.toString());
			if(document.getElementById) track=document.getElementById(divid).style;
			else if(document.all) track=document.all[divid].style;
			else if(document.layers) track=document.layers[divid].style;
			if(divid!=idx+(d.toString())) track.display=track.display?"none":"none";
			else {
				if(track=="none") track.display=track.display?"":"block";
				else track.display=track.display?"":"none";
			}
		}
		catch(exception) {}
	}
}

function IMW_showHide(divid) {
	var track;
	try {
		if(document.getElementById) track=document.getElementById(divid).style;
		else if(document.all) track=document.all[divid].style;
		else if(document.layers) track=document.layers[divid].style;
		if(track=="none") track.display=track.display?"":"block";
		else track.display=track.display?"":"none";
	}
	catch(exception) {}
}

function IMW_centerPop(theURL,winName,width,height,features) {
	var window_width = width;
	var window_height = height;
	var newfeatures = features;
	var window_top = (screen.height-window_height)/2;
	var window_left = (screen.width-window_width)/2;
	newWindow=window.open(
		''+theURL+'',
		''+winName+'',
		'width='+window_width+',height='+window_height+',top='+window_top+',left='+window_left+',features='+newfeatures+''
	);
	newWindow.focus();
}

function IMW_Preload() {
	var d=document;
	if(d.images) {
		if(!d.IMW_p) d.IMW_p=new Array();
		var i,j=d.IMW_p.length,a=IMW_Preload.arguments;
		for(i=0; i<a.length; i++) {
			if(a[i].indexOf("#")!=0) {
				d.IMW_p[j]=new Image;
				d.IMW_p[j++].src=a[i];
			}
		}
	}
}

function IMW_Obj(n,d) {
	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=IMW_Obj(n,d.layers[i].document);
	if(!x && d.getElementById) x=d.getElementById(n);
	return x;
}

function IMW_Swap() {
	var i,j=0,x,a=IMW_Swap.arguments;
	document.IMW_sr=new Array;
	for(i=0;i<(a.length-2);i+=3) {
		if((x=IMW_Obj(a[i]))!=null) {
			document.IMW_sr[j++]=x;
			if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];
		}
	}
}

function IMW_Restore() {
	var i,x,a=document.IMW_sr;
	for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

var isNN = (navigator.appName.indexOf("Netscape")!=-1);
function IMW_AutoTab(input, len, e) {
	var keyCode = (isNN) ? e.which : e.keyCode;
	var filter = (isNN) ? [0,8,9] : [0,8,9,16,17,18,37,38,39,40,46];
	if(input.value.length >= len && !containsElement(filter,keyCode)) {
		input.value = input.value.slice(0, len);
		input.form[(getIndex(input)+1) % input.form.length].focus();
	}
	
	function containsElement(arr, ele) {
		var found = false, index = 0;
		while(!found && index < arr.length) {
			if(arr[index] == ele) found = true;
			else index++; return found;
		}
	}
	
	function getIndex(input) {
		var index = -1, i = 0, found = false;
		while(i < input.form.length && index == -1) { 
			if(input.form[i] == input)index = i;
			else i++;
		}
		return index;
	}

	return true;
}

function IMW_NetscapeReload(init) {
	if(init==true) with (navigator) {
		if((appName=="Netscape")&&(parseInt(appVersion)==4)) {
			document.imw_pgW = innerWidth;
			document.imw_pgH = innerHeight;
			onresize = IMW_rP;
		}
	}
	else if(innerWidth!=document.imw_pgW || innerHeight!=document.imw_pgH) location.reload();
}
IMW_NetscapeReload(true);

//-->