// JavaScript Document
function loadStuff(){

	MM_preloadImages('images/PeakWeb_down_01.jpg','images/PeakWeb_down_02.jpg','images/PeakWeb_down_03.jpg','images/PeakWeb_down_04.jpg','images/PeakWeb_down_05.jpg','images/PeakWeb_down_06.jpg') ;

	objPop = document.getElementById('popin');

	MM_swapImage('Image20','','images/PeakWeb_down_04.jpg',1) ;

}

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_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_findObj(n, d) { //v4.0
  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 && document.getElementById) x=document.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 runMouseOut(pobj){
	var jPage = '<?=$page?>' ;
	var jItem = pobj.id + '.php' ;


	if(jPage!=jItem){
		MM_swapImgRestore() ;
	}

}
function slideUp(){
	if(iPopTop > 280){
		iPopTop--;
		objPop.style.top = iPopTop ;
	}
}
function raiseEcomBox(pItem){

	var ecommer = document.getElementById('ecommer') ;

	if(document.all){
		ecommer.filters[0].apply() ;
	} else {
		ecommer.style.left = 616 ;
		ecommer.style.width = 210 ;
	}

	switch(pItem){
	case 'merchants':
		ecommer.innerHTML = '<b>A merchant account</b> is issued by a banking institution to allow you to accept credit cards. ' ;
		ecommer.innerHTML += 'For online sales, accounts are accessed through payment gateway systems, such as Authorize.net or Linkpoint.  ' ;
		ecommer.innerHTML += '<br><br>' ;
		ecommer.innerHTML += 'For simpler online stores, services like Paypal can be used in place of the merchant\s account. No gateway or shopping cart is needed for Paypal, but a catalog is still required.' ;
		break;
	case 'gateway':
		ecommer.innerHTML = '<b>A payment gateway</b> is a secure internet banking application that accepts requests for credit card authorizations. ' ;
		ecommer.innerHTML += 'These requests are made by \'\'gateway scripts\'\' or software programs that gather information from the customer, and pass it to the gateway through its API - or application programming interface. ' ;
		ecommer.innerHTML += '<br><br>' ;
		ecommer.innerHTML += 'For simpler sites, services such as Paypal are attractive because they don\'t require gateway scripts.  ' ;
		break;
	case 'catalog':
		ecommer.innerHTML = '<b>A catalog</b> is just what it sounds like: a list of products or services on your website. ' ;
		ecommer.innerHTML += 'Visitors may browse and select products, and sometimes select options on them. Each customer\'s selections are stored in memory. ' ;
		ecommer.innerHTML += '<br><br>' ;
		ecommer.innerHTML += 'A <b>shopping cart</b> hold the customer\'s selections, and may be reviewed or changed before check-out.  It is the check-out process that triggers the gateway script/program. ' ;
		break;
	case 'manager':
		ecommer.innerHTML = '<b>A catalog manager</b> is the secure \'\'backdoor\'\' software application that lets managers edit the catalog. ' ;
		ecommer.innerHTML += 'This application lets you add products, possibly non-standard options, or even options within options if your business requires that.  ' ;
		ecommer.innerHTML += '<br><br>' ;
		ecommer.innerHTML += 'The catalog manager gives you real-time control over your catalog and pricing. ' ;
		break;
	case 'api':
		ecommer.innerHTML = '<b>These are programming terms</b> describing server script requirements for communication between your shopping cart and payment gateway. ' ;
		ecommer.innerHTML += 'The type depends on the type of web server you have.  We work with all of them.' ;
		ecommer.innerHTML += '<br><br>' ;
		ecommer.innerHTML += 'If your merchant bank has sent you emails or documents that use these kinds of terms, just send them to us, and we\'ll take it from there.' ;
		break;
	}

	//ecommer.innerHTML += '<br><br>' ;
	//ecommer.innerHTML += '<center><a href=# onclick=hideEcommBox();>Close</a></center>' ;

	if(document.all){
		ecommer.filters[0].apply() ;
	}

	ecommer.style.visibility = 'visible' ;

	if(document.all){
		ecommer.filters.revealTrans.transition=1 ;
		ecommer.filters.revealTrans.duration=0.25 ;
		ecommer.filters[0].play() ;
	}

}
function hideEcomBox(){
	var ecommer = document.getElementById('ecommer') ;

	if(document.all){
		ecommer.filters[0].apply() ;
	}

	ecommer.style.visibility = 'hidden' ;

	if(document.all){
		ecommer.filters.revealTrans.transition=0 ;
		ecommer.filters.revealTrans.duration=0.25 ;
		ecommer.filters[0].play() ;
	}

}
function raiseChart(event){
	var echart = document.getElementById('echart') ;

	if(document.all){
		echart.style.left = window.event.x + 2 ;
		echart.filters[0].apply() ;
		echart.style.visibility = 'visible' ;
		echart.filters.revealTrans.transition=1 ;
		echart.filters.revealTrans.duration=0.25 ;
		echart.filters[0].play() ;
	} else {
		echart.style.left = event.pageX + 2 ;
		echart.style.visibility = 'visible' ;
	}

}
function hideChart(){
	var echart = document.getElementById('echart') ;

	if(document.all){
		echart.filters[0].apply() ;
	}

	echart.style.visibility = 'hidden' ;

	if(document.all){
		echart.filters.revealTrans.transition=0 ;
		echart.filters.revealTrans.duration=0.25 ;
		echart.filters[0].play() ;
	}
}
function popSA(){
	var iW = 830 ;
	var iH = 600 ;
	var iL = (screen.width - iW) / 2 ;
	var iT = 20 ;
	var saer = window.open('http://www.saleautomations.com/SA-Basic/', 'saer', 'width=' + iW + ',height=' + iH + ',left=' + iL + ',top=' + iT + ',location=1,menubar=1,scrollbars=1,resizable=1') ;
}