function showhideRow(iID){
	var cRow = document.getElementById("row"+iID)
	var cSpan = document.getElementById("span"+iID)
	if(cSpan){
		if(cSpan.style.display=="none"){
			cSpan.style.display="block";
			cSpan.style.visibility = "visible";
			cRow.style.paddingBottom = 2;
		}
		else{
			cSpan.style.display="none";
			cSpan.style.visibility = "hidden";
			cRow.style.paddingBottom = 0;
		}
	}
}

function showRow(iID){
	var numargs = arguments.length
	for(i=0;i<numargs;i++){ 
		var cRow = document.getElementById("row"+arguments[i])
		var cSpan = document.getElementById("span"+arguments[i])
		if(cSpan){
			cSpan.style.display="block";
			cSpan.style.visibility = "visible";
			cRow.style.paddingBottom = 2;
		}
	}
}

function showImg(sImg){
	cImgDiv = document.getElementById('imgContent')
	if(!is.ie5&&!is.ie6){
		cImgDiv = document.getElementById('imgContent')
		cImgDiv.style.backgroundImage = 'url('+eval(sImg+'Img.src')+')';
	}
	else{
		cImgDiv = document.getElementById('imgDIV')
		cImgDiv.filters[0].Apply();                   
		//cDiv.filters.item("DXImageTransform.Microsoft.GradientWipe").Motion = "forward";
   		cImgDiv.style.backgroundImage = 'url('+eval(sImg+'Img.src')+')';
    	cImgDiv.filters[0].Play();
	}
}

var cModelImg
var cModelTD = null
function showGalleryAnim(sImg, oObj, sACase){
	oDiv = oObj
	//oImg = document.images[sImg]
	if(cModelTD!=oObj){
		if(sACase==1){
			oDiv.style.backgroundColor = "#790000";
			//oImg.src = "media/gallery/"+sImg+"Small.jpg";
		}
		else{
			oDiv.style.backgroundColor = "";
			//oImg.src = "media/gallery/"+sImg+"Small_Hover.jpg";
		}
	}
}


// Gallery
var cGallImg = "img0Div";

function showGalleryImg(sImg, oObj){
	oDiv = document.getElementById("imgContent")
	if(cModelTD!=null) cModelTD.style.backgroundColor = "";
	cModelTD = oObj;
	cModelTD.style.backgroundColor = "#DA8B35";
	if(!is.ie5&&!is.ie6){
		cImgDiv = document.getElementById(sImg)
   		if(cGallImg!=""&&sImg!=cGallImg) document.getElementById(cGallImg).style.display = "none";
		cImgDiv.style.display = "block";
		cGallImg = sImg;
	}
	else{
		cImgDiv = document.getElementById(sImg)
		oDiv.filters[0].Apply();		
   		if(cGallImg!=""&&sImg!=cGallImg) document.getElementById(cGallImg).style.display = "none";
		cImgDiv.style.display = "block";	
		cGallImg = sImg;	
		oDiv.filters[0].Play();
	}	
}

var cTeam = "content0Div"
function showTeamImg(sImg, sContent, oObj, sTitle){
	oDiv = document.getElementById("imgContent");
	oTitleDiv = document.getElementById("title");
	//alert(sContent)
	if(cTeam!=sContent) document.getElementById(cTeam).style.display = "none";
	document.getElementById(sContent).style.display = "block";
	cTeam = sContent;
	if(cModelTD!=null) cModelTD.style.backgroundColor = "";
	cModelTD = oObj;
	cModelTD.style.backgroundColor = "#DA8B35";
	oTitleDiv.innerHTML = sTitle;
	if(!is.ie5&&!is.ie6){
		cImgDiv = document.getElementById(sImg)
   		if(cGallImg!=""&&sImg!=cGallImg) document.getElementById(cGallImg).style.display = "none";
		cImgDiv.style.display = "block";
		cGallImg = sImg;
	}
	else{
		cImgDiv = document.getElementById(sImg)
		oDiv.filters[0].Apply();		
   		if(cGallImg!=""&&sImg!=cGallImg) document.getElementById(cGallImg).style.display = "none";
		cImgDiv.style.display = "block";	
		cGallImg = sImg;	
		oDiv.filters[0].Play();
	}
		
}


function showModelAnim(sImg, oTD, sACase){
	oImg = document.images[sImg]
	if(sACase==1){
		oTD.style.backgroundColor = "#222222";
		oImg.src = "media/model/"+sImg+"Small.jpg";
	}
	else{
		oTD.style.backgroundColor = "";
		oImg.src = "media/model/"+sImg+"Small_Hover.jpg";
	}
}


bToggleGalleryGallery = 0
function fnToggleGallery(oDiv,sImg) {
	 if(oDiv.className=="GalleryTD"){
		oObj = document.getElementById("oBGSound")
		if(oDiv.filters) oDiv.filters[0].Apply();                   
		if (bToggleGalleryGallery) {                                                        
	        bToggleGallery = 0;
			if(oDiv.filters){
				oDiv.filters.item("DXImageTransform.Microsoft.GradientWipe").Motion = "reverse";
				oObj.loop = 1;
		   		oObj.src = "media/audio/sounddown.wav"
			}
			else{
				oObj.loop = "FALSE";
				oObj.src = "media/audio/sounddown.wav"
			}
			oDiv.style.backgroundImage = "url(media/site/"+sImg+")";
		}
	    else {
	        bToggleGallery = 1;
			if(oDiv.filters){
				oDiv.filters.item("DXImageTransform.Microsoft.GradientWipe").Motion ="forward";
				oObj.loop = 1;
			    oObj.src = "media/audio/soundup.wav"					
			}
			else{
				oObj.loop = "FALSE";
				oObj.src = "media/audio/soundup.wav"	
			}						
		    oDiv.style.backgroundImage = "url(media/site/"+sImg+")";
		}      
	    if(oDiv.filters) oDiv.filters[0].Play();
	}
}

var cCustonTD = "contentImg1Div";

function showImg(iCase){
	oDiv = document.getElementById("tdImgDiv");
	oSmallDiv1 = document.getElementById("smallImg1");
	oSmallDiv2 = document.getElementById("smallImg2");
	if(iCase==1){
		oSmallDiv1.style.backgroundColor = "#DA8B35";
		oSmallDiv2.style.backgroundColor = "";
		if(!is.ie5&&!is.ie6){
			document.getElementById("contentImgDiv").style.display = "none";
			document.getElementById("contentImg1Div").style.display = "block";
			document.getElementById("contentImg2Div").style.display = "none";
		}
		else{
			oDiv.filters[0].Apply();		
			document.getElementById("contentImgDiv").style.display = "none";
			document.getElementById("contentImg1Div").style.display = "block";
			document.getElementById("contentImg2Div").style.display = "none";
			oDiv.filters[0].Play();
		}
		cModelTD = oSmallDiv1;		
	}
	else{
		oSmallDiv2.style.backgroundColor = "#DA8B35";
		oSmallDiv1.style.backgroundColor = "";
		if(!is.ie5&&!is.ie6){
			document.getElementById("contentImgDiv").style.display = "none";
			document.getElementById("contentImg1Div").style.display = "none";
			document.getElementById("contentImg2Div").style.display = "block";
		}
		else{
			oDiv.filters[0].Apply();		
			document.getElementById("contentImgDiv").style.display = "none";
			document.getElementById("contentImg1Div").style.display = "none";
			document.getElementById("contentImg2Div").style.display = "block";
			oDiv.filters[0].Play();
		}	
		cModelTD = oSmallDiv2;		
	}
}

function showImg_(iCase){
	document.getElementById("contentImgDiv").style.display = "none";
	document.getElementById("contentImg1Div").style.display = "none";
	document.getElementById("contentImg2Div").style.display = "none";
	document.getElementById("contentImg"+iCase+"Div").style.display = "block";	
	document.getElementById("smallImg1").style.backgroundColor = "#000000";		
	document.getElementById("smallImg2").style.backgroundColor = "#000000";	
	document.getElementById("smallImg"+iCase).style.backgroundColor = "#DA8B35";
}

function showGalleryPictures(iCurrentPs, iTotalDiv){
	for(i=1;i<=iTotalDiv;i++){
		document.getElementById("pictDiv"+i).style.display = "none";
		if(i!=iCurrentPs) document.getElementById("link_"+i).style.textDecoration = "none"; 
	}
	document.getElementById("pictDiv"+iCurrentPs).style.display = "block";
	document.getElementById("link_"+iCurrentPs).style.textDecoration = "underline"; 
}

function checkMail(sInputValue,oFormField){
	var myRe = /[a-z0-9_.=-]+@([a-z0-9-]+\.)+([a-z]{2,3})/i;
	if (!(sInputValue).match(myRe))	{
		alert(emailErrorML)
		oFormField.focus()
		return false
	}
	else {
		return true
	}
}

function checkMessenge(oForm){
	if(oForm.NickName.value==""){
		alert(alertGB[0])
		oForm.NickName.focus();
		return false
	} 
	else{
		if(oForm.Email.value==""){
			alert(alertGB[1])
			oForm.Email.focus();
			return false
		} 
		else{
			if(oForm.Title.value==""){
				alert(alertGB[2])
				oForm.Title.focus();
				return false
			}
			else{
				if(oForm.Messenge.value==""){
					alert(alertGB[3])
					oForm.Messenge.focus();
					return false
				}
				else{
					return true
				}
			}
		}
	}
}

function setBrowserForm(sFormName, intRowFirst){
	document.forms[sFormName].action = document.location.href;
	document.forms[sFormName].intRowFirst.value = intRowFirst;
	document.forms[sFormName].submit();
} 
