// JavaScript Document
var objPop ;
var iPopTop = 720 ;
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('Image19','','images/PeakWeb_down_03.jpg',1) ;

}

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 hidePopin(){
//	objPop.style.visibility = 'hidden' ;
//}

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 popEmail(){
	var emailIt = document.getElementById('emailIt') ;
	var jH = 'contact' ;
	jH = jH + '@' ;
	jH = jH + 'peakwebdevelopment.com' ;
	//emailIt.innerHTML = jH ;
	emailIt.href = 'mailto:' + jH ;
}
function openDemo(){
	var iW = screen.width * .99 ;
	var iH = screen.height * .78 ;
	var yesno = confirm('The following sample site has a simple calendar installed.\n\nUse \'\'EDIT THIS SITE\'\' at the upper left to add events. The public calendar is the next link down.\n\nOpen sample site?');
	if(yesno==true){
		var oDemo = window.open('./samplesite/', 'sample', 'left=0,top=0,width=' + iW + ',height=' + iH + ',location=1,menubar=1,scrollbars=1,toolbar=1,resizable=1') ;
	}
}
function openPN(){
	var iW = screen.width * .99 ;
	var iH = screen.height * .78 ;
	var yesno = confirm('The following sample of Project Notebook is not secure.  For client implementations, we use SSL security and validation on each page view.\n\nOpen Project Notebook?');
	if(yesno==true){
		var oDemo = window.open('./samplesite/pn/', 'sample', 'left=0,top=0,width=' + iW + ',height=' + iH + ',location=1,menubar=1,scrollbars=1,toolbar=1,resizable=1') ;
	}
}
function openFlashBar(){
	var iW = 600 ;
	var iH = 520 ;
	var iL = (screen.width - iW) / 2 ;
	var iT = (screen.height - iH) / 4 ;
	var oFlashHits = window.open('./UBPChits.html', 'flashhits', 'left=' + iL + ',top=' + iT + ',width=' + iW + ',height=' + iH + ',location=0,menubar=0,scrollbars=0,toolbar=0,resizable=0') ;
}
function openFlashPie(){
	var iW = 400 ;
	var iH = 460 ;
	var iL = (screen.width - iW) / 2 ;
	var iT = (screen.height - iH) / 4 ;
	var oFlashHits = window.open('./kcbiz_piehits.html', 'flashpie', 'left=' + iL + ',top=' + iT + ',width=' + iW + ',height=' + iH + ',location=0,menubar=0,scrollbars=0,toolbar=0,resizable=0') ;
}
function openPollPie(){
	var iW = 400 ;
	var iH = 460 ;
	var iL = (screen.width - iW) / 2 ;
	var iT = (screen.height - iH) / 4 ;
	var oFlashHits = window.open('http://www.kcsmallbusiness.com/poll_pie.html', 'flashpollpie', 'left=' + iL + ',top=' + iT + ',width=' + iW + ',height=' + iH + ',location=0,menubar=0,scrollbars=0,toolbar=0,resizable=0') ;
}
function openFlashOgive(){
	var iW = 600 ;
	var iH = 520 ;
	var iL = (screen.width - iW) / 2 ;
	var iT = (screen.height - iH) / 4 ;
	var oFlashHits = window.open('./UBPChits_30.html', 'flashogive', 'left=' + iL + ',top=' + iT + ',width=' + iW + ',height=' + iH + ',location=0,menubar=0,scrollbars=0,toolbar=0,resizable=0') ;
}
function showBullets(){
	var bullets = document.getElementById('bullets') ;

	if(document.all){
		bullets.filters[0].apply() ;
	}
	bullets.style.visibility = 'visible' ;
	if(document.all){
		bullets.filters.revealTrans.transition=1 ;
		bullets.filters.revealTrans.duration=0.25 ;
		bullets.filters[0].play() ;
	}

}
function hideBullets(){
	var bullets = document.getElementById('bullets') ;

	if(document.all){
		bullets.filters[0].apply() ;
	}
	bullets.style.visibility = 'hidden' ;
	if(document.all){
		bullets.filters.revealTrans.transition=0 ;
		bullets.filters.revealTrans.duration=0.25 ;
		bullets.filters[0].play() ;
	}
}
function popUC(){
	var iW = screen.width * .99 ;
	var iH = screen.height * .72 ;
	var oUC = window.open('https://ssl62.alentus.com/unionbuiltsoftware/peak_comm/login_sample.htm', 'sample', 'left=0,top=0,width=' + iW + ',height=' + iH + ',location=0,menubar=1,scrollbars=1,toolbar=1,resizable=1,status=1') ;
}
function simCal(){
	var iW = 810 ;
	var iH = 500 ;
	var iL = (screen.availWidth - iW) / 2 ;
	var iT = (screen.availHeight - iH) / 2 ;
	var oSimCal = window.open('./samplesite/calendar/calendar.php', 'simcal', 'left=' + iL + ',top=' + iT + ',width=' + iW + ',height=' + iH + ',location=0,menubar=0,scrollbars=1,toolbar=0,resizable=0,status=0') ;

}
function metaTest(){
	var iW = 620 ;
	var iH = 500 ;
	var iL = (screen.availWidth - iW) / 2 ;
	var iT = (screen.availHeight - iH) / 2 ;
	var oSimCal = window.open('./meta_test.php', 'metatest', 'left=' + iL + ',top=' + iT + ',width=' + iW + ',height=' + iH + ',location=0,menubar=0,scrollbars=1,toolbar=0,resizable=0,status=0') ;

}
