/* show flash */
function showSSThumb(divID, _id, _photoID, _imgPath, _title, _username, _gender, _iconPath, _photoPageLink, _screenshotLink){
	var flashvars = {id:_id, imgPath:_imgPath, photoID:_photoID, title:_title, username:_username, gender:_gender, iconPath:_iconPath, photoPageLink:_photoPageLink, screenshotLink:_screenshotLink};
	var params = {menu:"false"};
	var attributes = {};
	swfobject.embedSWF("/files/fp/ss_thumb.swf", divID, "130", "113", "9.0.0", false, flashvars, params, attributes);
}
			
/* handle the search box query here */
function fpSearch(){
	url = document.getElementById('fp-search-index').value;
	explodeURL = "flickr.com/photos/";
	defaultURL = "http://www.flickr.com/photos/(username or ID)";
	errorMsg = "";
	_splitURL = url.split(explodeURL);
	_userName = _splitURL[1];
	
	if(_userName == undefined){ // user fiddled with the URL
		alert("Oops! That's an incorrect URL.");
		return;
	}
	
	if(_userName == '(username or ID)' || _userName == ''){ // user did not enter anything
		alert("Oops! You need to enter a username first.");
		return;
	}
	
	window.location = '/fp/search?user='+_userName;
	//alert(_userName);
}
