function enlargeImage(url) { var newwindow; newwindow=window.open(url,'wf_image','width=850,height=800,resizable=1,scrollbars=1,toolbar=0,location=0,status=0'); if (window.focus) {newwindow.focus()}} function mediaWindow(file,suffix,width,height) { var newwindow; var win_width=parseInt(width)+50; var win_height=parseInt(height)+25; switch (suffix) { case 'flv': newwindow=window.open('/go.php/flv_player/'+file+'/'+width+'/'+height,'wf_video', 'width='+win_width+',height='+win_height+',resizable=1,scrollbars=1,toolbar=0,location=0,status=0'); break; case 'swf': newwindow=window.open('/go.php/swf_player/'+file+'/'+width+'/'+height,'wf_video', 'width='+win_width+',height='+win_height+'resizable=1,scrollbars=1,toolbar=0,location=0,status=0'); break; case 'mp3': case 'wma': break; } if (window.focus) {newwindow.focus()}} /* A J A X - R E L A T E D F U N C T I O N S *********************************************** */ // Get the HTTP Object function getHTTPObject(){ if (window.ActiveXObject) return new ActiveXObject("Microsoft.XMLHTTP"); else if (window.XMLHttpRequest) return new XMLHttpRequest(); else { alert("Your browser does not support the necessary version of Javascript to display this page. Please try a newer browser."); return null; } } // SEND RATING (IF ANY), RETURN UPDATED RATING BOX function updateRating(entry_id, rating) { rb = document.getElementById('rating-box'); httpObject = getHTTPObject(); if (httpObject != null) { httpObject.open("GET", "/go.php/wf_ajax/rating_box/"+entry_id+"/"+rating, true); httpObject.send(null); httpObject.onreadystatechange = setRbOutput; } } // CHANGE THE VALUE OF THE RATING BOX DIV // rb OBJECT IS GLOBAL function setRbOutput() { if(httpObject.readyState == 4){ rb.innerHTML = httpObject.responseText; } } // INITIALIZE SELECTOR BOX function initSelector(site, type, category_group, category_init) { //alert(category); f = document.getElementById('selector-form'); f.site.value = site; f.type.value = type; f.category_group.value = category_group; f.category_init.value = category_init; } // NEW TOGGLE LARGE BOX CATEGORY function largeBox(type, category) { lb = document.getElementById('box-large-items'); httpObject = getHTTPObject(); if (httpObject != null) { httpObject.open("GET", '/go.php/wf_ajax/'+type+'/'+category, true); httpObject.send(null); httpObject.onreadystatechange = setLbOutput; } } // NEW MULTI-PURPOSE TOGGLE SELECTOR BOX function updateSelector(type) { //, parent sb = document.getElementById('selector'); f = document.getElementById('selector-form'); site = f.site.value; type = f.type.value; category_group = f.category_group.value; f.category_init.value > 0 ? c1 = f.category_init.value : c1 = f.category.value; c2 = f.subcategory.value; cat = 0; if (c1 > 0) cat = c1; if (c2 > 0) cat = c2; // && !parent c3=0; c4=0; httpObject2 = getHTTPObject(); if (httpObject2 != null) { httpObject2.open("GET", "/go.php/wf_ajax/selector/"+site+"/"+type+"/"+category_group+"/"+c1+"/"+c2+"/"+c3+"/"+c4, true); httpObject2.send(null); httpObject2.onreadystatechange = setSbOutput; } largeBox(type, cat); } // CHANGE THE VALUE OF THE LARGE ARTICLES BOX DIV // lb OBJECT IS GLOBAL function setLbOutput() { if(httpObject.readyState == 4){ lb.innerHTML = httpObject.responseText; } } // CHANGE THE CONTENTS OF THE SELECTOR FORM // sb OBJECT IS GLOBAL function setSbOutput() { if(httpObject2.readyState == 4){ sb.innerHTML = httpObject2.responseText; } }