// Catch possible bugs with WebTV and other older browsers


/**
* Function to emulate document.getElementById
*
* @param	string	Object ID
*
* @return	mixed	null if not found, object if found
*/

function fetch_object(idname)
{
	if (document.getElementById)
	{
		return document.getElementById(idname);
	}
	else if (document.all)
	{
		return document.all[idname];
	}
	else if (document.layers)
	{
		return document.layers[idname];
	}
	else
	{
		return null;
	}
}

// Collapsible element handlers

/**
* Toggles the collapse state of an object.
*
* @param	string	Unique ID for the collapse group
*
* @return	boolean	false
*/


function toggle_collapse(objid)
{    
    //document.write(objid);
	obj = fetch_object('collapseobj_' + objid);

	if (obj.style.display == 'none')
	{
		obj.style.display = '';
		save_collapsed(objid, false);
	}
	else
	{
		obj.style.display = 'none';
		save_collapsed(objid, true);
	}
    
	return false;
    
}

function colapse_onload(objid)
    {
    
        
        obj = fetch_object('collapseobj_' + 'oglas_collapse' + objid);
        //obj = fetch_object('collapseobj_oglas_collapseMarkeri');
        obj.style.display = 'none';
        save_collapsed(objid, true);
        //document.write('collapseobj_' + 'oglas_collapse' + objid);
    

    
return null;        
    }


// SKLAPAJUĆI OBJEKTI - kraj