var ajax = new sack();

function getpodcatfirm(sel)
{
	var catcode = sel.options[sel.selectedIndex].value;
	document.getElementById('id_podcat').options.length = 0;	// Empty city select box
	if(catcode.length>0)
	{
		ajax.requestFile = '/getpodcat1.php?id_cat='+catcode;	// Specifying which file to get
		ajax.onCompletion = createpodcatfirm;	// Specify function that will be executed after file has been found
		ajax.runAJAX();		// Execute AJAX function
	}
}

function createpodcatfirm()
{
	var obj = document.getElementById('id_podcat');
	eval(ajax.response);	// Executing the response from Ajax as Javascript code	
}	
function getpodcattovar(sel)
{
	var catcode = sel.options[sel.selectedIndex].value;
	document.getElementById('id_podcat').options.length = 0;	// Empty city select box
	if(catcode.length>0)
	{
		ajax.requestFile = '/getpodcattovar1.php?id_cat='+catcode;	// Specifying which file to get
		ajax.onCompletion = createpodcattovar;	// Specify function that will be executed after file has been found
		ajax.runAJAX();		// Execute AJAX function
	}
}

function createpodcattovar()
{
	var obj = document.getElementById('id_podcat');
	eval(ajax.response);	// Executing the response from Ajax as Javascript code	
}	


function getrubriktovar(sel)
{
	var podcatcode = sel.options[sel.selectedIndex].value;
	document.getElementById('id_rubrik').options.length = 0;	// Empty city select box
	if(podcatcode.length>0)
	{
		ajax.requestFile = '/getpodcattovar1.php?id_podcat='+podcatcode;	// Specifying which file to get
		ajax.onCompletion = createrubriktovar;	// Specify function that will be executed after file has been found
		ajax.runAJAX();		// Execute AJAX function
	}
}

function createrubriktovar()
{
	var obj = document.getElementById('id_rubrik');
	eval(ajax.response);	// Executing the response from Ajax as Javascript code	
}	

function getpodcatuslugi(sel)
{
	var catcode = sel.options[sel.selectedIndex].value;
	document.getElementById('id_podcat').options.length = 0;	// Empty city select box
	if(catcode.length>0)
	{
		ajax.requestFile = '/getpodcatuslugi1.php?id_cat='+catcode;	// Specifying which file to get
		ajax.onCompletion = createpodcatuslugi;	// Specify function that will be executed after file has been found
		ajax.runAJAX();		// Execute AJAX function
	}
}

function createpodcatuslugi()
{
	var obj = document.getElementById('id_podcat');
	eval(ajax.response);	// Executing the response from Ajax as Javascript code	
}	


function getrubrikuslugi(sel)
{
	var podcatcode = sel.options[sel.selectedIndex].value;
	document.getElementById('id_rubrik').options.length = 0;	// Empty city select box
	if(podcatcode.length>0)
	{
		ajax.requestFile = '/getpodcatuslugi1.php?id_podcat='+podcatcode;	// Specifying which file to get
		ajax.onCompletion = createrubrikuslugi;	// Specify function that will be executed after file has been found
		ajax.runAJAX();		// Execute AJAX function
	}
}

function createrubrikuslugi()
{
	var obj = document.getElementById('id_rubrik');
	eval(ajax.response);	// Executing the response from Ajax as Javascript code	
}	

