

	
function DivSwitchNext()
	{
	var index = false;
	
	var tab = new Array();
		
	tab[0] = "project1";
	tab[1] = "project2";
	tab[2] = "project3";
	tab[3] = "project4";	
	tab[4] = "project5";
	tab[5] = "project6";
	tab[6] = "project7";
	tab[7] = "project8";
	tab[8] = "project9";
	tab[9] = "project10";
	
	for(x in tab)
		{	
		var object = document.getElementById(tab[x]);
		
		if(object.style.display == "")
			{
			index = x;
			}
		}
		
	var newindex = 	parseInt(index)+1;
	var newobject = document.getElementById(tab[newindex]);
	
	if(newobject)
		{		
		for(x in tab)
			{	
			var sobject = document.getElementById(tab[x]);
			sobject.style.display = "none";
			}
		newobject.style.display = "";
		}
	else
		{
		var newindex = 0;
		var newobject = document.getElementById(tab[newindex]);
		
		for(x in tab)
			{	
			var sobject = document.getElementById(tab[x]);
			sobject.style.display = "none";
			}
		newobject.style.display = "";
		}
	}
	
	
function DivSwitchPrev()
	{
	var index = false;
	
	var tab = new Array();
		
	tab[0] = "project1";
	tab[1] = "project2";
	tab[2] = "project3";
	tab[3] = "project4";	
	tab[4] = "project5";
	tab[5] = "project6";
	tab[6] = "project7";
	tab[7] = "project8";
	tab[8] = "project9";
	tab[9] = "project10";
	
	for(x in tab)
		{	
		var object = document.getElementById(tab[x]);
		
		if(object.style.display == "")
			{
			index = x;
			}
		}
		
	var newindex = 	parseInt(index)-1;
	var newobject = document.getElementById(tab[newindex]);
	
	if(newobject)
		{		
		for(x in tab)
			{	
			var sobject = document.getElementById(tab[x]);
			sobject.style.display = "none";
			}
		newobject.style.display = "";
		}
	else
		{
		var newindex = tab.length-1;
		var newobject = document.getElementById(tab[newindex]);
		
		for(x in tab)
			{	
			var sobject = document.getElementById(tab[x]);
			sobject.style.display = "none";
			}
		newobject.style.display = "";
		}
	}
	
	
function dodajzakladke(tytul,adres) {
if (window.sidebar) //  dla firefoksa
   window.sidebar.addPanel(tytul, adres, "");
else if(window.opera && window.print) { // dla opery
   var elem = document.createElement('a');
   elem.setAttribute('href',adres);
   elem.setAttribute('title',tytul);
   elem.setAttribute('rel','sidebar');
   elem.click();
} 
else if(document.all)// dla internet explorera
   window.external.AddFavorite(adres, tytul);
}



function DivSwitchRNext()
	{
	var index = false;
	
	var tab = new Array();
		
	tab[0] = "project1";
	tab[1] = "project2";
	tab[2] = "project3";
	
	for(x in tab)
		{	
		var object = document.getElementById(tab[x]);
		
		if(object.style.display == "")
			{
			index = x;
			}
		}
		
	var newindex = 	parseInt(index)+1;
	var newobject = document.getElementById(tab[newindex]);
	
	if(newobject)
		{		
		for(x in tab)
			{	
			var sobject = document.getElementById(tab[x]);
			sobject.style.display = "none";
			}
		newobject.style.display = "";
		}
	else
		{
		var newindex = 0;
		var newobject = document.getElementById(tab[newindex]);
		
		for(x in tab)
			{	
			var sobject = document.getElementById(tab[x]);
			sobject.style.display = "none";
			}
		newobject.style.display = "";
		}
	}
	
	
function DivSwitchRPrev()
	{
	var index = false;
	
	var tab = new Array();
		
	tab[0] = "project1";
	tab[1] = "project2";
	tab[2] = "project3";
	
	for(x in tab)
		{	
		var object = document.getElementById(tab[x]);
		
		if(object.style.display == "")
			{
			index = x;
			}
		}
		
	var newindex = 	parseInt(index)-1;
	var newobject = document.getElementById(tab[newindex]);
	
	if(newobject)
		{		
		for(x in tab)
			{	
			var sobject = document.getElementById(tab[x]);
			sobject.style.display = "none";
			}
		newobject.style.display = "";
		}
	else
		{
		var newindex = tab.length-1;
		var newobject = document.getElementById(tab[newindex]);
		
		for(x in tab)
			{	
			var sobject = document.getElementById(tab[x]);
			sobject.style.display = "none";
			}
		newobject.style.display = "";
		}
	}

	
function pngfix()
	{
	var arVersion = navigator.appVersion.split("MSIE")
		var version = parseFloat(arVersion[1])
		
		if ((version >= 5.5) && (version < 7.0) && (document.body.filters)) 
		{
			 for(var i=0; i<document.images.length; i++)
			 {
					var img = document.images[i]
					var imgName = img.src.toUpperCase()
					if (imgName.substring(imgName.length-3, imgName.length) == "PNG")
					{
						 var imgID = (img.id) ? "id='" + img.id + "' " : ""
						 var imgClass = (img.className) ? "class='" + img.className + "' " : ""
						 var imgTitle = (img.title) ? "title='" + img.title + "' " : "title='" + img.alt + "' "
						 var imgStyle = "display:inline-block;" + img.style.cssText 
						 if (img.align == "left") imgStyle = "float:left;" + imgStyle
						 if (img.align == "right") imgStyle = "float:right;" + imgStyle
						 if (img.parentElement.href) imgStyle = "cursor:hand;" + imgStyle
						 var strNewHTML = "<span " + imgID + imgClass + imgTitle
						 + " style=\"" + "width:" + img.width + "px; height:" + img.height + "px;" + imgStyle + ";"
						 + "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
						 + "(src=\'" + img.src + "\', sizingMethod='scale');\"></span>" 
						 img.outerHTML = strNewHTML
						 i = i-1
					}
			 }
		}
	
	}


