function PreImg() {
 var d=document;
 if(d.images){
  if(!d.CCEp){
   d.CCEp=new Array();
  }
 }
 var i,j=d.CCEp.length;
 var a=PreImg.arguments;
 for(i=0; i<a.length; i++){
  if (a[i].indexOf("#")!=0){
   d.CCEp[j]=new Image;
   d.CCEp[j++].src=a[i];
  }
 }
}

function 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=Obj(n,d.layers[i].document);
 if(!x && d.getElementById) x=d.getElementById(n);
 return x;
}

function SwapImg() {
 var i,j=0,x;
 var a=SwapImg.arguments;
 document.CCEsr=new Array;
 for(i=0;i<(a.length-1);i+=2){
  if ((x=Obj(a[i]))!=null){
   document.CCEsr[j++]=x;
   if(!x.oSrc) x.oSrc=x.src;
   x.src=a[i+1];
  }
 }
}

function Restore() {
 var i,x,a=document.CCEsr;
 for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++){
  x.src=x.oSrc;
 }
}

function externalLinks() {
 if (!document.getElementsByTagName) return;
 var anchors = document.getElementsByTagName("a");
 for (var i=0; i<anchors.length; i++) {
   var anchor = anchors[i];
   if (anchor.getAttribute("href") &&
       anchor.getAttribute("rel") == "external")
     anchor.target = "_blank";
 }
}
window.onload=externalLinks;

function openUri(uri){
	window.open(uri,"newopen");
}

function timeDisp1(){
	today = new Date();
	year = today.getYear();
	if (year < 1000) {
			year += 1900;
	}
	document.write(year);
}


function setFocus(that){
	that.style.backgroundImage='none';
	that.style.backgroundRepeat='no-repeat';
	that.style.backgroundColor='#FFFFFF';
	that.onblur = function() {
		if( that.value === '' ) {
			that.style.backgroundImage='url(img/img_input_sample.gif)';
			that.style.backgroundRepeat='no-repeat';
			that.style.backgroundColor='#FFFFFF';
		}
	}
	that.onfocus = function() {
		that.style.backgroundImage='none';
		that.style.backgroundRepeat='no-repeat';
		that.style.backgroundColor='#FFFFFF';
	}
}

function setFocus2(that,imgFile){
	that.style.backgroundImage='none';
	that.style.backgroundRepeat='no-repeat';
	that.style.backgroundColor='#FFFFFF';
	that.onblur = function() {
		if( that.value === '' ) {
			that.style.backgroundImage='url(' + imgFile + ')';
			that.style.backgroundRepeat='no-repeat';
			that.style.backgroundColor='#FFFFFF';
		}
	}
	that.onfocus = function() {
		that.style.backgroundImage='none';
		that.style.backgroundRepeat='no-repeat';
		that.style.backgroundColor='#FFFFFF';
	}
}

function thisYear(){
	var copyday = new Date();
	var copyyear = copyday.getFullYear();
	var copypronto = document.getElementById("copyright");
	if(copypronto){
		copypronto.innerHTML='<img src="common/img/copyright'+copyyear+'.gif" width="251" height="10" alt="Copyright&copy; ' + copyyear + ', PRONTO Corporation. All Rights Reserved." />';
	}
}
function addEvent(){
	try {
		window.addEventListener('load', this.thisYear, false);
	} catch (e) {
		window.attachEvent('onload', this.thisYear);
	}
}
addEvent();