/*--- Avanquest WebEasy Custom Script ---*/

function bannerPlayer (cmd, PicMin, PicMax) { 
 
// BANNER PLAYER 
// COPYRIGHT 2010 by PFLEGER GERALD PETER SITOLUTIONS 
// Version 1.0, December 2010 
 
// Player Reference: <IMG title="PowerPartner" alt="PowerPartner" src="http://www2.vknet.at/PowerPartnerBanner/VKNETAT_PowerPartner_0.png" name=BannerPlayer></IMG> 
// Startsequenz: OnLoad="bannerPlayer ('init','0','3')" 
// Runsequenz: window.setTimeout("bannerPlayer ('next','0','0')",5000) 
 
var _PicUrl  ="http://www2.vknet.at/PowerPartnerBanner/"; 
 
var _PicNam  ="VKNETAT_PowerPartner_";	// Name 
var _PicExt  =".png";	// File typ bzw. File extension 
 
var _CurrPic = 0; 
var _NextPic = 0; 
var _PrevPic = 0; 
 
//_CurrPic = parseInt(document.BannerPlayer.src.substr(document.BannerPlayer.src.indexOf(_PicExt)-1,1)); 
//_CurrPic = document.getElementById("BannerPlayer").firstChild.data; 
//_NextPic = _CurrPic + 1; 
//_PrevPic = _CurrPic - 1; 
 
switch (cmd) { 
 
  case "init": 
 
	if (PicMin!=0){document.getElementById("PlayerPage").firstChild.data = PicMin}; 
	if (PicMax!=0){document.getElementById("PlayerPages").firstChild.data = PicMax};   
 
	_PicMin  = Number(document.getElementById("PlayerPage").firstChild.data);	// Picture  Min count 
	_PicMax  = Number(document.getElementById("PlayerPages").firstChild.data); 	// Pictures Max count 
	_PicHome = _PicMin;															// Start Picture 
	_Home  =_PicUrl + _PicNam + _PicHome + _PicExt;								// Home path 
	document.BannerPlayer.src = _Home; 
	break; 
 
	case "next": 
	_NextPic = Number(document.getElementById("PlayerPage").firstChild.data) + 1; 
//	if (_NextPic >= _PicMax) { _NextPic = _PicMax; }; 
	if (_NextPic > _PicMax) { _NextPic = _PicMin; }; 
	document.BannerPlayer.src= _PicUrl + _PicNam + _NextPic + _PicExt; 
	document.getElementById("PlayerPage").firstChild.data = _NextPic; 
	break; 
 
  case "prev": 
	_PrevPic = Number(document.getElementById("PlayerPage").firstChild.data) - 1; 
//	if (_PrevPic <= _PicMin) { _PrevPic = _PicMin; }; 
	if (_PrevPic < _PicMin) { _PrevPic = _PicMax; };	  
	document.BannerPlayer.src= _PicUrl + _PicNam + _PrevPic  + _PicExt; 
	document.getElementById("PlayerPage").firstChild.data = _PrevPic; 
	break; 
 
  case "home": 
	document.BannerPlayer.src= _Home; 
	document.getElementById("PlayerPage").firstChild.data = _PicHome; 
	break; 
 
    } 
	 
	window.setTimeout("bannerPlayer ('next','0','0')",5000) 
}

/*--- EndOfFile ---*/

