//reklama


// get element style value

function FWxGetStyle(Element, Name)

{

	// if style is in style array we can use it

	if(Element.style[Name])

		return Element.style[Name];

		

	// try IE method

	else if(Element.currentStyle)

		return Element.currentStyle[Name];

	

	// W3C method

	else if(document.defaultView && document.defaultView.getComputedStyle)

	{

		Name = Name.replace(/([A-Z])/g,"-$1");

		Name = Name.toLowerCase();

		

		var s = document.defaultView.getComputedStyle(Element, "");

		return s && s.getPropertyValue(Name);

	}

	else

		return null;

}


// make element hidden

function FWxHidde(Element)

{

	var ActualDisplay = FWxGetStyle(Element, 'display');

	

	if(ActualDisplay != 'none')

		Element.$OldDisplay = ActualDisplay;

		

	Element.style.display = 'none';

}
// set X offset 

function FWxSetX(Element, Val)

{

	Element.style.left = Val + "px";

}

// set Y offset

function FWxSetY(Element, Val)

{

	Element.style.top = Val + "px";

}


// get height of element

function FWxGetHeight(Element)

{

	return parseInt(FWxGetStyle(Element, "height"));

}

// get width of element

function FWxGetWidth(Element)

{

	return parseInt(FWxGetStyle(Element, "width"));

}

// make element visibility

function FWxVisible(Element)

{

	Element.style.display = Element.$OldDisplay || '';

}

// set opacity

function FWxSetOpacity(Element, level)

{

	Element.style.opacity = level / 100;

	Element.style.filter = 'alpha(opacity=' + level +')';

}

// get page height

function FWxGetPageHeight()

{

	return document.body.scrollHeight;

}

// get page width

function FWxGetPageWidth()

{

	return document.body.scrollWidth;

}

// get page scroll offset Y

function FWxGetPageScrollY()

{

	var de = document.documentElement;

	

	return self.pageYOffset || (de && de.scrollTop) || document.body.scrollTop;

}

// get viewport height

function FWxGetViewportHeight()

{

	var de = document.documentElement;

	

	return self.innerHeight || (de && de.clientHeight) || document.body.clientHeight; 

}

// JavaScript Document

function ClearSEOContent()

{

	document.getElementById('about_div').style.display = 'none';

}



////////////////////////////////////////////////////////////////////////////////////////////////////

// edit / delete file

function DisplayEditDeleteFile()

{

	FadeInShadowLayer();



}

////////////////////////////////////////////////////////////////////////////////////////////////////

// ShadowLayer

var ShadowLayerInterval;

var CurrentShadowLayerOpacity = 0;



function FadeInShadowLayer()

{

	var Ele = document.getElementById('shadow_layer');

	

	// set height and width

	Ele.style.height =FWxGetPageHeight() + "px";

	Ele.style.width = FWxGetPageWidth() + "px";

	

	// set position

	FWxSetX(Ele, 0);

	FWxSetY(Ele, 0);

	

	FWxVisible(Ele);

	

	// reset opacity

	CurrentShadowLayerOpacity = 0;

	FWxSetOpacity(Ele, CurrentShadowLayerOpacity);

	

	clearInterval(ShadowLayerInterval); 

	ShadowLayerInterval = setInterval("AnimateShadowLayer(true)", 10); 

}



function FadeOutShadowLayer()

{

	FWxHidde(document.getElementById('edit_delete_file'));

	

	clearInterval(ShadowLayerInterval); 

	ShadowLayerInterval = setInterval("AnimateShadowLayer(false)", 10); 

}



function AnimateShadowLayer(vector)

{

	var Ele = document.getElementById('shadow_layer');

	

	FWxSetOpacity(Ele, CurrentShadowLayerOpacity);

	

	if(vector)

	{

		CurrentShadowLayerOpacity += 10;

		

		if(CurrentShadowLayerOpacity >= 80)

		{

			clearInterval(ShadowLayerInterval);

			OnFadeInShadowLayerComplete();

		}

	}

	else

	{

		CurrentShadowLayerOpacity -= 10;

		

		if(CurrentShadowLayerOpacity <= 0)

		{

			clearInterval(ShadowLayerInterval);

			OnFadeOutShadowLayerComplete();

		}

	}

}



function OnFadeInShadowLayerComplete()

{

	var Ele = document.getElementById('shadow_layer');

	

	Ele.onclick = FadeOutShadowLayer;



	

	//display contact form

	var ContactForm = document.getElementById('edit_delete_file');

	

	// set position

	var X = parseInt( (FWxGetPageWidth() / 2) - (FWxGetWidth(ContactForm) / 2) );

	var Y = parseInt( (FWxGetViewportHeight() / 2) + FWxGetPageScrollY() - (FWxGetHeight(ContactForm) / 2) );

	FWxSetX(ContactForm, X);

	FWxSetY(ContactForm, Y);

	

	FWxVisible(ContactForm);

}



function OnFadeOutShadowLayerComplete()

{

	var Ele = document.getElementById('shadow_layer');

	

	FWxHidde(Ele);

}



function SendContactForm()

{

	if(CheckSendContactForm())

	{

		FadeOutShadowLayer();

		document.forms.edit_delete_file.submit();

	}

}



//reklama konec



function noveokno(adresa){
	window.open(adresa);
	return false;	
}


function nacteni(){
	listMenu = new FSMenu('listMenu', true, 'display', 'block', 'none');
	listMenu.animations[listMenu.animations.length] = FSMenu.animFade;
	listMenu.animations[listMenu.animations.length] = FSMenu.animSwipeDown;
	var arrow = null;
	if (document.createElement && document.documentElement){
		arrow = document.createElement('span');
		//arrow.appendChild(document.createTextNode('>'));
		//arrow.innerHTML = "&rarr;";
		arrow.className = 'subind';
	}
	listMenu.activateMenu("listMenuRoot", arrow);
}

window.onload = function(){
	nacteni();
}

function kontrola_formulare()
                      
                      {
                         if(document.getElementById("email").value.length==0) {
                           alert("Zadejte email, je to povinnĂ˝ Ăşdaj.");
                           document.getElementById("email").focus();
                         return false;
                      }
                      
                       if(document.getElementById("predmet").value.length==0) {   
                            alert("Zadejte pĹ™edmÄ›t, je to povinnĂ˝ Ăşdaj.");
                              document.getElementById("predmet").focus();
                          return false;
                      }
                      
                       if(document.getElementById("jmeno").value.length==0) {   
                            alert("Zadejte jmĂ©no, je to povinnĂ˝ Ăşdaj.");
                              document.getElementById("jmeno").focus();
                          return false;
                      }
                          if(document.getElementById("zprava").value.length==0) {
                             alert("Zadejte zprĂˇvu, je to povinnĂ˝ Ăşdaj.");
                              document.getElementById("zprava").focus();
                          return false;
                      }
                          return true;
                      }


                      
