// Chained Selects
// Copyright Xin Yang 2004
// Web Site: www.yxScripts.com
// EMail: m_yangxin@hotmail.com
// Last Updated: Jan. 31, 2009
// This script is free as long as the copyright notice remains intact.
var _disable_empty_list=false;
var _hide_empty_list=false;
function goListGroup(apikey, L7, L6, L5, L4, L3, L2, L1){
var GlobalOptions = "";
$('.global').each(function(){
var checked = $(this).prop('checked');
if(checked) {
var globalID = $(this).attr('id');
// handle jsonp/callback global option differently
if(globalID == "jsonp") {
GlobalOptions = GlobalOptions + "&" + globalID + "=foo";
} else {
GlobalOptions = GlobalOptions + "&" + globalID + "=1";
}
}
});
// handle the show.getposter / show.getbanner differently as they return an image and not json
if (L1 == "?cmd=show.getposter" || L1 == "?cmd=show.getbanner") {
var imgcache = sbRoot + "/api/" + apikey + "/" + L1 + L2 + GlobalOptions;
var html = imgcache + '
';
$('#apiResponse').html(html);
$.ajax({
url: sbRoot + "/api/" + apikey + "/" + L1 + L2 + GlobalOptions,
async: false,
cache: false,
dataType: "html",
success: function (img) {
$('#imgcache').attr('src', imgcache);
}
})
}
else {
var html = sbRoot + "/api/" + apikey + "/" + L1 + L2 + L3 + L4 + L5 + L6 + L7 + GlobalOptions + "
"; html += $.ajax({ url: sbRoot + "/api/" + apikey + "/" + L1 + L2 + L3 + L4 + L5 + L6 + L7 + GlobalOptions, async: false, dataType: "html", }).responseText; html += ''; $('#apiResponse').html(html); } } // ------ if (typeof(disable_empty_list)=="undefined") { disable_empty_list=_disable_empty_list; } if (typeof(hide_empty_list)=="undefined") { hide_empty_list=_hide_empty_list; } var cs_goodContent=true, cs_M="M", cs_L="L", cs_G="G", cs_EG="EG"; var cs_names=new Array(); var cs_supportDOM=document.createElement; var cs_nav=navigator.userAgent.toLowerCase(); var cs_isIE7=(cs_nav.indexOf("msie 7")!=-1 || cs_nav.indexOf("msie 8")!=-1); var cs_isOpera=(cs_nav.indexOf("opera")!=-1); var cs_isMac=(cs_nav.indexOf("mac")!=-1); function cs_findOBJ(obj,n) { for (var i=0; i