// JavaScript Document
/////////////////////////////
function IncludeJavaScript(jsFile)
{
  document.write('<script type="text/javascript" src="'
    + jsFile + '"></scr' + 'ipt>'); 
}
IncludeJavaScript('checkdate.js');
IncludeJavaScript('scw.js');
///////////////////////////////////////////////////////////
function isNum(passedVal)
{	
	if (passedVal.length<1)
	{
		return false
	}
	for (i=0; i<passedVal.length; i++) 
	{
		if (passedVal.charAt(i) == ".") 
			{
				return true
			}
		if (passedVal.charAt(i) < "0")
		{
			return false 
		}
		if (passedVal.charAt(i) > "9")
		{
			return false
		}
	}
	return true
};

function hidediv(id) {
	//safe function to hide an element with a specified id
	if (document.getElementById) { // DOM3 = IE5, NS6
		document.getElementById(id).style.display = 'none';
	}
	else {
		if (document.layers) { // Netscape 4
			document.id.display = 'none';
		}
		else { // IE 4
			document.all.id.style.display = 'none';
		}
	}
};
function showdiv(id) {
	//safe function to show an element with a specified id
		  
	if (document.getElementById) { // DOM3 = IE5, NS6
		document.getElementById(id).style.display = 'block';
	}
	else {
		if (document.layers) { // Netscape 4
			document.id.display = 'block';
		}
		else { // IE 4
			document.all.id.style.display = 'block';
		}
	}
};

function Select_Value_Set(SelectName, Value) {
  eval('SelectObject = document.' + 
    SelectName + ';');
  for(index = 0; 
    index < SelectObject.length; 
    index++) {
   if(SelectObject[index].value == Value)
     SelectObject.selectedIndex = index;
   }
}


function showMeSl(id, box)
{
	if(box=='true')
	{
		showdiv(id);
	}
	else
	  hidediv(id);
};

function event_h(val)
{
	
	if(val=='Nunta')
	{
		hidediv('ore_hs');
		Select_Value_Set('gen_pret_step_1.durata', '10');
		
	}
	else if(val=='Botez')
	{
		hidediv('ore_hs');
		Select_Value_Set('gen_pret_step_1.durata', '7');
	}
	else if(val=='Banchet')
	{
		hidediv('ore_hs');
		Select_Value_Set('gen_pret_step_1.durata', '10');
	}
	else if(val=='Majorat')
	{
		hidediv('ore_hs');
		Select_Value_Set('gen_pret_step_1.durata', '8');
	}
	else if(val=='null')
	{
		hidediv('ore_hs');
		Select_Value_Set('gen_pret_step_1.durata', 'Ore');
	}
	else
	{
	  showdiv('ore_hs');
	  Select_Value_Set('gen_pret_step_1.durata', 'Ore');
	}
};
function showMeCk(id, box)
{
	if(box.checked==true)
	{
		showdiv(id);
	}
	else
	  hidediv(id);
};

function kara()
{
	alert('xx');
};
IncludeJavaScript('validat_forms.js');