// JavaScript Document


function openPopup(theURL,winName,features) {
	
  window.open(theURL,winName,features);
}


function  openPopupLearningPod(openValue,theURL,winName,features){
	
	if (openValue != ''){
		openPopup(theURL+openValue,winName,features);
	}
}

// SEARCH FUNCTIONS -->
// ----------------
function lookup(text_video) {
	if(text_video.length == 0) {
		// Hide the suggestion box.
		$('#suggestions').hide();
	} else {
		$.post("rpc.php", {queryString: ""+text_video+""}, function(data){
			if(data.length >0) {
				$('#suggestions').show();
				$('#autoSuggestionsList').html(data);
			}
		});
	}
} // lookup

function lookupPartner(text_video) {
	if(text_video.length == 0) {
		// Hide the suggestion box.
		$('#suggestionsPartner').hide();
	} else {
		$.post("rpc-partner.php", {queryString: ""+text_video+""}, function(data){
			if(data.length >0) {
				$('#suggestionsPartner').show();
				$('#autoSuggestionsPartnerList').html(data);
			}
		});
	}
} // lookup

function fill(thisValue) {
	$('#text_video').val(thisValue);
	setTimeout("$('#suggestions').hide();", 200);
}

function fillPartner(thisValue) {
	$('#subcab').val(thisValue);
	setTimeout("$('#suggestionsPartner').hide();", 200);
}



// ----------------
// <-- SEARCH FUNCTIONS




