function check(field) { if (field.length == 1){ field.checked = true; } else{ for (i = 0; i < field.length; i++) { field[i].checked = true; } } } function openContentType(contentTypeId) { parent.content.location='http://partner.bambooavenue.net/contents.mpl?contenttypeid='+contentTypeId; parent.contenttypes.location='http://partner.bambooavenue.net/contenttypes.mpl?visible='+contentTypeId; } function openCollection(collectionId) { parent.content.location='http://partner.bambooavenue.net/contents.mpl?collectionid='+collectionId; parent.contenttypes.location='http://partner.bambooavenue.net/contenttypes.mpl?visible=c_'+collectionId; } function checkItem(contentId) { var e = document.getElementsByName("items"); for (var i=0; i < e.length; i++) { if (e[i].id == "items_"+contentId) { if (e[i].checked) e[i].checked=false; else e[i].checked=true; return; } } } function checkProfileItem(id, name) { var e = document.getElementsByName(name); for (var i=0; i < e.length; i++) { if (e[i].id == id) { if (e[i].checked) e[i].checked=false; else e[i].checked=true; return; } } } function sortContentBy(fieldName) { var l = document.URL; l = l.replace(/\&contentSort\=\w*/, ""); l = l+"&contentSort="+fieldName; document.location = l; } function sortContentDir(direction) { var l = document.URL; l = l.replace(/\&contentSortDir\=\w*/, ""); l = l+"&contentSortDir="+direction; document.location = l; } function displayAdult(direction) { var l = document.URL; l = l.replace(/\&displayAdult\=\w*/, ""); l = l+"&displayAdult="+direction; document.location = l; } function displayProvidedContent(direction) { var l = document.URL; l = l.replace(/\&displayProvidedContent\=\w*/, ""); l = l+"&displayProvidedContent="+direction; document.location = l; } function displayDownloaded(direction) { var l = document.URL; l = l.replace(/\&displayDownloaded\=\w*/, ""); l = l+"&displayDownloaded="+direction; document.location = l; }