// MACROMEDIA DREAMWEAVER ROLLOVERS

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_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_findObj(n, d) { //v4.01
  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 && d.getElementById) x=d.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];}}
   
// IMG TOGGLE

function toggleimg(id)
{
if (document.getElementById(id).src.indexOf("images/button_plus.gif") > 0)
  {
  document.getElementById(id).src = "images/button_minus.gif";
  document.getElementById(id).alt = "Hide details";
  }
else
  {
  document.getElementById(id).src = "images/button_plus.gif";
  document.getElementById(id).alt = "Show details";
  }
}

// IMG_SMALL TOGGLE

function toggleimg_small(id)
{
if (document.getElementById(id).src.indexOf("images/button_plus_small.gif") > 0)
  {
  document.getElementById(id).src = "images/button_minus_small.gif";
  document.getElementById(id).alt = "Hide form";
  }
else
  {
  document.getElementById(id).src = "images/button_plus_small.gif";
  document.getElementById(id).alt = "Show form";
  }
}

// DIV TOGGLE

function togglediv(id)
{	
if(document.getElementById(id).style.display=='block')
	{
	document.getElementById(id).style.display='none';
	document.getElementById(id).style.visibility='hidden';
	}
else 
	{
	document.getElementById(id).style.display='block';
	document.getElementById(id).style.visibility='visible';
	}
}

// OPEN NEW WINDOW

var win=null;

function NewWindow(mypage,myname,w,h,scroll,pos){
if(pos=="random"){LeftPosition=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;TopPosition=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;}
if(pos=="center"){LeftPosition=(screen.width)?(screen.width-w)/2:100;TopPosition=(screen.height)?(screen.height-h)/2:100;}
else if((pos!="center" && pos!="random") || pos==null){LeftPosition=0;TopPosition=20}
settings='width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no';
win=window.open(mypage,myname,settings);}

function openWindow(URL, windowName, windowFeatures) {
	newWindow = window.open(URL, windowName, windowFeatures)
}

// OPEN VIDEO WINDOW

function doVideo(video, high_quality){
	if (high_quality) {
		theWindow = NewWindow('popup.asp?video='+video+'&bandwidth=high','videohi','320','285','no');
	} else {
		theWindow = NewWindow('popup.asp?video='+video+'&bandwidth=low','videolow','160','165','no');
	}	
}

// DOWNLOAD FORM

function doDownload(){
    var my_var = '';
    if (this.GetElqContentPersonalizationValue){
        my_var = GetElqContentPersonalizationValue('V_Form___Download1p');
    }
	if (my_var == ''){
		//theWindow = NewWindow('download_form.htm', 'popup','450','400','no');
		document.location.href = 'knowledgecenter.asp?download=yes'
	} 
	else { 
		document.location.href = 'knowledgecenter_downloads.asp';
	}
}

// NEWS HEADLINES

function correct(){
if (finished){
setTimeout("begin()",3000)
}
return true
}
window.onerror=correct
function begin(){
if (!document.all)
return
if (maxheight==null)
maxheight=temp.offsetHeight
news.style.height=maxheight
temp.style.display="none"
c=1
finished=true
change()
}

var head=''
var top=0
var maxheight
var finished=false
var tickers=new Array()

tickers[0]='<a href="knowledgecenter_pressreleases.asp">Loading Procuri News...</a>'
tickers[1]='<a href="knowledgecenter_pressreleases.asp?release=108">Procuri Marks 2005 as a Record Year for Growth</a>'
tickers[2]='<a href="knowledgecenter_pressreleases.asp?release=107">Domino’s CFO Joins Procuri Board of Directors</a>'
tickers[3]='<a href="knowledgecenter_pressreleases.asp?release=106">Tim Minahan Joins Procuri as SVP of Marketing</a>'
tickers[4]='<a href="knowledgecenter_pressreleases.asp?release=104">Procuri Wins Two TotalContracts Customers: Allegis Group and Brookmeade Group</a>'
tickers[5]='<a href="knowledgecenter_pressreleases.asp?release=103">National City Deploys Procuri Solutions to Streamline Sourcing Process</a>'

for (i=1;i<=tickers.length-1;i++){
if (tickers[i].length>=tickers[top].length)
top=i
}

function change(){
news.innerHTML=''
news.filters.revealTrans.apply()
news.filters.revealTrans.play()
news.innerHTML=tickers[c]
if (c==tickers.length-1) 
c=1
else
c+=1
setTimeout("change()",5000)
}

// CUSTOMER LOGOS

var SlideShow_CustomersSpeed = 2500
var crossFadeDuration = 3
var Customer = new Array()

Customer[0] = 'images/customer_gmacmortgage.gif'
Customer[1] = 'images/customer_usbank.gif'
Customer[2] = 'images/customer_cchmc.gif'
Customer[3] = 'images/customer_cleveland.gif'
Customer[4] = 'images/customer_bgi.gif'
Customer[5] = 'images/customer_arrow.gif'
Customer[6] = 'images/customer_bcbssc.gif'
Customer[7] = 'images/customer_kellogg.gif'
Customer[8] = 'images/customer_bcbsnc.gif'
Customer[9] = 'images/customer_hhcmc.gif'
Customer[10] = 'images/customer_centura.gif'
Customer[11] = 'images/customer_gentex.gif'
Customer[12] = 'images/customer_reuters.gif'
Customer[13] = 'images/customer_fujitsu.gif'
Customer[14] = 'images/customer_bcbsa.gif'
Customer[15] = 'images/customer_toyota.gif'
Customer[16] = 'images/customer_autodesk.gif'
Customer[17] = 'images/customer_icg.gif'
Customer[18] = 'images/customer_wellstar.gif'
Customer[19] = 'images/customer_gp.gif'
Customer[20] = 'images/customer_qualcomm.gif'
Customer[21] = 'images/customer_expedia.gif'
Customer[22] = 'images/customer_mellon.gif'
Customer[23] = 'images/customer_nationalcity.gif'
Customer[24] = 'images/customer_oneamerica.gif'
Customer[25] = 'images/customer_tds.gif'
Customer[26] = 'images/customer_halifax.gif'
Customer[27] = 'images/customer_geisinger.gif'
Customer[28] = 'images/customer_biogen.gif'
Customer[29] = 'images/customer_bbraun.gif'
Customer[30] = 'images/customer_amfam.gif'
Customer[31] = 'images/customer_allegis.gif'
Customer[32] = 'images/customer_nwtel.gif'
Customer[33] = 'images/customer_principal.gif'
Customer[34] = 'images/customer_akron.gif'
Customer[35] = 'images/customer_america.gif'
Customer[36] = 'images/customer_delorme.gif'
Customer[37] = 'images/customer_ims.gif'
Customer[38] = 'images/customer_genvec.gif'
Customer[39] = 'images/customer_medimmune.gif'
Customer[40] = 'images/customer_bostonfinancial.gif'
Customer[41] = 'images/customer_jep.gif'
Customer[42] = 'images/customer_bcbsark.gif'
Customer[43] = 'images/customer_interbrew.gif'
Customer[44] = 'images/customer_progressive.gif'
Customer[45] = 'images/customer_spinmaster.gif'
Customer[46] = 'images/customer_botm.gif'

var t
var j = 0
var p = Customer.length

var preLoad_Customer = new Array()
preLoad_Customer[j] = new Image()
preLoad_Customer[j].src = Customer[j]

function SlideShow_Customers(){
   if (document.all){
      document.images.SlideShow_Customers.style.filter="blendTrans(duration=2)"
      document.images.SlideShow_Customers.style.filter="blendTrans(duration=crossFadeDuration)"
      document.images.SlideShow_Customers.filters.blendTrans.Apply()
   }
   document.images.SlideShow_Customers.src = preLoad_Customer[j].src
   if (document.all){
      document.images.SlideShow_Customers.filters.blendTrans.Play()
   }
   j ++
   if (j > (p-1)) j=0
   t = setTimeout('SlideShow_Customers()', SlideShow_CustomersSpeed)

if (!preLoad_Customer[j]) {
  preLoad_Customer[j] = new Image()
  preLoad_Customer[j].src = Customer[j]
}
}

// AWARD LOGOS

var SlideShow_AwardsSpeed = 10000
var Award = new Array()

Award[0] = 'images/award_2005_fast50.gif'
Award[1] = 'images/award_2005_top50entrepreneurs.gif'
Award[2] = 'images/award_2005_sdce100.gif'
Award[3] = 'images/award_2005_pacesetters.gif'
Award[4] = 'images/award_2005_sdceprostoknow.gif'
Award[5] = 'images/award_2005_ta10mostinnovative.gif'
Award[6] = 'images/award_2005_sunmicrosystems.gif'
Award[7] = 'images/award_2006_sdceprostoknow.gif'

var u
var k = 0
var q = Award.length

var preLoad_Award = new Array()
preLoad_Award[k] = new Image()
preLoad_Award[k].src = Award[k]

function SlideShow_Awards(){
   if (document.all){
      document.images.SlideShow_Awards.style.filter="blendTrans(duration=2)"
      document.images.SlideShow_Awards.style.filter="blendTrans(duration=crossFadeDuration)"
      document.images.SlideShow_Awards.filters.blendTrans.Apply()
   }
   document.images.SlideShow_Awards.src = preLoad_Award[k].src
   if (document.all){
      document.images.SlideShow_Awards.filters.blendTrans.Play()
   }
   k ++
   if (k > (q-1)) k=0
   u = setTimeout('SlideShow_Awards()', SlideShow_AwardsSpeed)

if (!preLoad_Award[k]) {
  preLoad_Award[k] = new Image()
  preLoad_Award[k].src = Award[k]
}
}