var clogo;
function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}

function isDefined(cVar) {
	return (typeof(cVar) == "undefined") ? false : true; }

/**
	class (ctor) represents a menu item
*/
function cLogoItem() {
	this.imgName = arguments[0];					// html name of image (first argument)
	this.defaultNum = arguments[1];					// number of default image
	// set adopted paths
	if(cLogoItem.arguments[2] != "")
		this.img0 = cLogoItem.arguments[2]; 	
	if(cLogoItem.arguments[3] != "")
		this.img1 = cLogoItem.arguments[3]; 	
	if(cLogoItem.arguments[4] != "")
		this.img2 = cLogoItem.arguments[4]; 	
	if(cLogoItem.arguments[5] != "")
		this.img3 = cLogoItem.arguments[5]; 	
	if(cLogoItem.arguments[6] != "")
		this.img4 = cLogoItem.arguments[6]; 	
		
	this.allImages = new Array();	// image objects

	// load all defined images
	if (isDefined(this.img0))
		this.allImages[0] = newImage(this.img0);
	if (isDefined(this.img1))
		this.allImages[1] = newImage(this.img1);
	if (isDefined(this.img2))
		this.allImages[2] = newImage(this.img2);
	if (isDefined(this.img3))
		this.allImages[3] = newImage(this.img3);
	if (isDefined(this.img4))
		this.allImages[4] = newImage(this.img4);

	/** - function doRollover
		process event for mouseover
	*/
	this.doRollover = function(cImgNum) {
		if(isDefined(this.allImages[cImgNum])) {
			document.getElementById(this.imgName).src = this.allImages[cImgNum].src;
			//document.images[this.imgName].src = this.allImages[cImgNum].src;
		}
	}	

	/** - function doRollout
		process event for mouseout
	*/
	this.doRollout = function() {
		this.doRollover(this.defaultNum);
	}

}
// --------------------------------------

function logoCreateRollover(cDefImg)
{
	var imgName="clogo";
	var pathKonzept = "../../images/pagekonzept_logo.jpg";
	var pathDesign = "../../images/pagedesign_logo.jpg";
	var pathCoding = "../../images/pagecoding_logo.jpg";
	var pathHosting = "../../images/pagehosting_logo.jpg";
	var pathPromo = "../../images/pagepromo_logo.jpg";
	return new cLogoItem(imgName, cDefImg, pathKonzept, pathDesign, pathCoding, pathHosting, pathPromo);
}

function logoCreateRolloverRoot(cDefImg)
{
	var imgName="clogo";
	var pathKonzept = "images/pagekonzept_logo.jpg";
	var pathDesign = "images/pagedesign_logo.jpg";
	var pathCoding = "images/pagecoding_logo.jpg";
	var pathHosting = "images/pagehosting_logo.jpg";
	var pathPromo = "images/pagepromo_logo.jpg";
	return new cLogoItem(imgName, cDefImg, pathKonzept, pathDesign, pathCoding, pathHosting, pathPromo);
}

function logoCreateRolloverSubRoot(cDefImg)
{
	var imgName="clogo";
	var pathKonzept = "../images/pagekonzept_logo.jpg";
	var pathDesign = "../images/pagedesign_logo.jpg";
	var pathCoding = "../images/pagecoding_logo.jpg";
	var pathHosting = "../images/pagehosting_logo.jpg";
	var pathPromo = "../images/pagepromo_logo.jpg";
	return new cLogoItem(imgName, cDefImg, pathKonzept, pathDesign, pathCoding, pathHosting, pathPromo);
}