function inuse_update(hash)
{
	var url = '/api/inuse.php';
	var pars = 'hash=' + hash;
	var myAjax = new Ajax.PeriodicalUpdater(
		{success: 'inuse_result' }, 
		url,
		{
			method: 'get', 
    		frequency: '2',
			parameters: pars, 
			onSuccess: function()  {  },
			onFailure: function() { alert("Updater has failed."); }
		});

    return true;
}

var newwindow = '';

function popitup(url) {
	if (!newwindow.closed && newwindow.location) {
		newwindow.location.href = url;
	}
	else {
		newwindow=window.open(url,'uploader','top=300,left=400,height=110,width=410');
		if (!newwindow.opener) newwindow.opener = self;
	}
	if (window.focus) {newwindow.focus()}
	return false;
}

function to_old_win(url)
{
	opener.location.href = url;
}



