var NAVIMG_PATH = '/images/nav/';
var MAINIMG_PATH = '/images/main/';

function PriNav( strImageID, strImage ,iMode ){
	if( document.idximg1 ){
		if( iMode == 0 ){
			ImageSwap( 'img_' + strImageID, NAVIMG_PATH + strImage + '_off.gif' );
			ImageSwap( 'idximg' + strImage, MAINIMG_PATH + 'img' + strImage + '_off.gif' );
//			ShowDiv( 0, 'navdiv' + strImage );
			
		} else {
			ImageSwap( 'img_' + strImageID, NAVIMG_PATH + strImage + '_roll.gif' );
			ImageSwap( 'idximg' + strImage, MAINIMG_PATH + 'img' + strImage + '_roll.gif' );
//			ShowDiv( 1, 'navdiv' + strImage );
		}	
	} else {
		if( iMode == 0 ){
			ImageSwap( 'img_' + strImageID, NAVIMG_PATH + strImage + '_off.gif' );
		} else {
			ImageSwap( 'img_' + strImageID, NAVIMG_PATH + strImage + '_roll.gif' );
		}
	}
}


function PreloadImages() {
  var d=document; 
  if(d.images){ if(!d.p)
  	d.p=new Array();
  var i,j=d.p.length,a=PreloadImages.arguments;
  for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){
		d.p[j]=new Image;
		d.p[j++].src=a[i];
	}
  }
}


function ImageSwap(strImg, strSrc){
  var objStr,obj;
  
  if(document.images){
    if (typeof(strImg) == 'string') {
      objStr = 'document.' + strImg;
      obj = eval(objStr);
      obj.src = strSrc;
    } else if ((typeof(strImg) == 'object') && strImg && strImg.src) {
      strImg.src = strSrc;
    }
  }
}

function ImgLoader(images_array) {

	for(loop = 0; loop < images_array.length; loop++)
	{
		// create a new Image object, then assign the image to image array element 
   		var img = new Image();
		img.src = images_array[loop];
	}
}

function ImageLoader(images_array) {

	for(loop = 0; loop < images_array.length; loop++)
	{
		// create a new Image object, then assign the image to image array element 
   		var img = new Image();
		img.src = images_array[loop];
	}
}

function Is() {
    agent  = navigator.userAgent.toLowerCase();
    this.major = parseInt(navigator.appVersion);
    this.minor = parseFloat(navigator.appVersion);
    this.ns    = ((agent.indexOf('mozilla')   !=   -1) && 
                 ((agent.indexOf('spoofer')   ==   -1) && 
                 (agent.indexOf('compatible') ==   -1)));
    this.ns4   = (this.ns && (this.major      ==    4));
    this.ns6   = (this.ns && (this.major      >=    5));
    this.ie    = (agent.indexOf("msie")       !=   -1);
    this.ie3   = (this.ie && (this.major      < 4));
    this.ie4   = (this.ie && (this.major      ==    4) && 
                 (agent.indexOf("msie 5.0")   ==   -1));
    this.ie5   = (this.ie && (this.major      ==    4) && 
                 (agent.indexOf("msie 5.0")   !=   -1));
    this.ie55  = (this.ie && (this.major      ==    4) && 
                 (agent.indexOf("msie 5.5")   !=   -1));
    this.ie6   = (this.ie && (agent.indexOf("msie 6.0")!=-1) );
}

var is = new Is();
