//var m_strUserName="";
var m_freesound;
var m_strAPIKey="";

var m_nSoundNum;
var m_strPrevPage = "";
var m_strNextPage = "";

var m_strSkinPath = "";
var m_strServerURL = "";
var BASE_URL = "http://www.freesound.org";

function SetServerURL(strServerURL)
{
	m_strServerURL = strServerURL;
	BASE_URL = "http://"+m_strServerURL+"/api/";
}

function SetSkinPath(strSKinPath)
{
	//alert(strSKinPath);
	m_strSkinPath = strSKinPath;
}

//function NewAccount()
//{
//	var strURL="http://"+m_strServerURL+"/home/register";
//	window.open(strURL);
//}

//function SetUserName(strUserName)
//{
//	m_strUserName = strUserName;
//}

//function errorUser(status_code, type, explanation)
//{
//	var ref = "Login:FAIL";
//	location = ref; 
//}

//function loginSuccess(user)
//{
//	var ref = "Login:SUCCESS";
//	location = ref;
//}

function SetAPIKey(strAPIKey)
{
	m_strAPIKey = strAPIKey;
	m_freesound = new Freesound(m_strAPIKey, true);
}

//function FreeSoundLogin(strAPIKey)
//{
//	m_strAPIKey = strAPIKey;
//	m_freesound = new Freesound(m_strAPIKey, true);
//	freesound.getUser(m_strUserName, loginSuccess, errorUser);
//}

