/*--------------Holdlink()---------------*/
function holdlink(id){
	document.getElementById(id).className='current';
}

function holdlink2(id){
	document.getElementById(id).className='current3';
}

function holdlink3(menu_id, submenu_id){
	document.getElementById(menu_id).className='current2';
	document.getElementById(submenu_id).className='currentsub2';
}

function holdlink4(id){
	document.getElementById(id).className='current2';
}
/*--------------Holdlink()---------------*/

/*------------include function---------------------*/
function include_file(id, url) {
	
  var req = false;
  // For Safari, Firefox, and other non-MS browsers
  if (window.XMLHttpRequest) {
    try {
      req = new XMLHttpRequest();
    } catch (e) {
      req = false;
    }
  } else if (window.ActiveXObject) {
    // For Internet Explorer on Windows
    try {
      req = new ActiveXObject("Msxml2.XMLHTTP");
    } catch (e) {
      try {
        req = new ActiveXObject("Microsoft.XMLHTTP");
      } catch (e) {
        req = false;
      }
    }
  }
 var element = document.getElementById(id);
  if (req) {
    // Synchronous request, wait till we have it all
	req.open('GET', url, false);
    req.send(null);
    element.innerHTML = req.responseText;
  } 
}
/*------------include function---------------------*/



/*popup functions*/
function backOrderPolicy()
{
	var NewWin1;
	NewWin1=window.open("backorderPolicy.htm",'NewWin1','height=655,width=666,top=10,left=150,location=no,status=no,toolbar=no,menubar=no,scrollbars=yes');
	NewWin1.focus();
}

function returnPolicy()
{
	var NewWin1;
	NewWin1=window.open("returnPolicy.htm",'NewWin1','height=655,width=666,top=10,left=150,location=no,status=no,toolbar=no,menubar=no,scrollbars=yes');
	NewWin1.focus();
}

/*popup functions*/

/*--------------Image Titles--------------*/

function getElement(id) {
return document.getElementById ? document.getElementById(id) :
document.all ? document.all(id) : null;
}

function titleChange(which, state, textCellId) {
	var el = getElement(textCellId);
	if (el && typeof el.innerHTML != 'undefined') {
	if (state == 'on') el.innerHTML = msg[which];
	}
}

function changeImg(path, imgtitle) {
	if(document.getElementById('bigimg').src!=path) {
	imgPreloader = new Image();
	
	
	// once image is preloaded, resize image container
	document.getElementById('bigimg').style.display="none";
	document.getElementById('loading_img').style.display="";
	imgPreloader.onload=function(){
	document.getElementById('loading_img').style.display="none";
	document.getElementById('bigimg').src=path;
	document.getElementById('bigimg').title=imgtitle;
	
	//document.getElementById('bigimg').style.display="";
	new Effect.Appear('bigimg',{ duration: 0.7, from: 0.0, to: 1.0});
	imgPreloader.onload=function(){};
	imgPreloader.src="";
	}
	imgPreloader.src=path;
	}
}


/*--------------Project Gallery Functions--------------*/
