function addLoadEvent(func) {  var oldonload = window.onload;  if (typeof window.onload != 'function') {    window.onload = func;  } else {    window.onload = function() {      if (oldonload) {        oldonload();      }      func();    }  }}function AddUnloadEvent(func) {  var oldunload = window.unload;  if (typeof window.unload != 'function') {    window.unload = func;  } else {    window.unload = function() {      if (oldunload) {        olunload();      }      func();    }  }}function openWindow( url, name, params, w, h ){var ah = window.screen.height;var aw = window.screen.width;params += params == "" ? "" : ",";params += "left=0,top=0,height="+ah+",width="+aw;var win_popup = window.open( "", name, params );win_popup.location.href = 'http://www.enterinside.com/layout/FlvFullscreen.php?string='+url;win_popup.resizeTo(screen.width,screen.height);win_popup.moveTo(0,0);win_popup.focus();}function changecss(theClass,element,value) {var cssRules;if (document.all) {cssRules = 'rules';}else if (document.getElementById) {cssRules = 'cssRules';}for (var S = 0; S < document.styleSheets.length; S++){for (var R = 0; R < document.styleSheets[S][cssRules].length; R++) {if (document.styleSheets[S][cssRules][R].selectorText == theClass) {document.styleSheets[S][cssRules][R].style[element] = value;}}}}function s_q(Str){Str.replace("'","");Str.replace('"',"");return Str;}function addvalue(Name, Value){change_value(Name, element_value(Name) + "." + Value);}function deletevalue(Name, Value){change_value(Name,  element_value(Name).replace("."+Value, ""));}function change_image(name, NewImage){document.getElementById(name).src = NewImage;}function change_value(name, value){document.getElementById(name).value = value;}function change_title(name, value){document.getElementById(name).title = value;}function element_html(name, html){document.getElementById(name).innerHTML = html;}function inner_html(name){return document.getElementById(name).innerHTML;}function hide(Element){document.getElementById(Element).style.display = 'none';}function show(Element){document.getElementById(Element).style.display = 'block';}function element_display(name, display){ document.getElementById(name).style.display = display;}function element_value(name){return document.getElementById(name).value;}function element_ok(name, message){document.getElementById(name).innerHTML = '<font class="green">'+message+'</font>';}function element_bad(name, message){document.getElementById(name).innerHTML = '<font class="red">'+message+'</font>';}function throbber_on(name){show(name);element_html(name, '<img src="http://www.enterinside.com/layout/images/throbber.gif">');}function throbber_message(name, message){show(name);element_html(name, '<img src="http://www.enterinside.com/layout/images/throbber.gif" align="left">&nbsp;&nbsp;&nbsp;'+message);}function throbber_off(name){var innerhtml = document.getElementById(name).innerHTML;innerhtml = innerhtml.replace('<img src="http://www.enterinside.com/layout/images/throbber.gif">', "");element_html(name, innerhtml);}function loop_force_showhide(s_prefix,show,h_prefix,hide){for (x = 0; x < show.length; x++){forceshow(s_prefix+show[x]);}for (x = 0; x < hide.length; x++){forcehide(h_prefix+hide[x]);}}function loop_showhide(prefix,array){for (x = 0; x < array.length; x++){showhide(prefix+array[x]);}}function loop_show(prefix,array){for (x = 0; x < array.length; x++){forceshow(prefix+array[x]);}}function loop_hide(prefix,array){for (x = 0; x < array.length; x++){forcehide(prefix+array[x]);}}function showhide(ElementName){ElementId = document.getElementById(ElementName);     if (ElementId.style.display == 'none')     {          ElementId.style.display = 'block';     }     else     {          ElementId.style.display = 'none';     }}function forceshow(ElementName){ElementId = document.getElementById(ElementName);ElementId.style.display = 'block';}function forcehide(ElementName){ElementId = document.getElementById(ElementName);ElementId.style.display = 'none';}function loop_setstyle(style, s_prefix, array){for (x = 0; x < array.length; x++){force_style(style, s_prefix+array[x]);}}function force_style(style, ElementName){ElementId = document.getElementById(ElementName);ElementId.className=style;}function textCounter(field, countfield, maxlimit) {if (field.value.length > maxlimit)field.value = field.value.substring(0, maxlimit);elsecountfield.value = maxlimit - field.value.length;}function ValidateMediaType(Element){var name = Element.value;var name = name.toLowerCase();var temp = new Array();temp = name.split('.');var type = temp[temp.length-1];if((type != "wmv") && (type != "mpeg") && (type != "mpg") && (type != "avi") && (type != "mp4") && (type != "flv")  &&(type != "mov") && (type != "jpg") && (type != "jpeg") && (type != "png") && (type != "gif") && (type != "bmp")){alert('"' +type + '" Is an incorrect File Type');Element.value = "";}}function CleanComment(comment) {var reg = new RegExp("<([^<>\s]*)(\s[^<>]*)?>", "g");    return comment.replace(reg,"");}function donothing(){}function ResizeIt(offset){if (parseInt(navigator.appVersion)>3) {if (navigator.appName=="Netscape") {winH = window.innerHeight;}if (navigator.appName.indexOf("Microsoft")!=-1) {winH = document.body.offsetHeight;}}document.getElementById('iframe').style.height = (winH - offset);}function ValidateUrl(Url) {    var v = new RegExp();    v.compile("^[A-Za-z]+://[A-Za-z0-9-_]+\\.[A-Za-z0-9-_%&\?\/.=]+$");    if (!v.test(Url)) {        return true;    } else {    return false;    }}////////////////////////////////////////////////////popup for editing newsletter subscribersfunction edituser(userid){var url = "/admin/newsletter/manage_entry_inc.php?id=" + userid;window.open(url, "Media", "width=300, height=116, left=400, top=300, menubar=no, status=no, location=no, toolbar=no, scrollbars=no, resizable=yes");}/////////////////////////////////////////////// Check/Un-Check checkboxfunction ffcheck(elementid){checkbox = document.getElementById(elementid);if(checkbox.checked == false){checkbox.checked = true;} else {checkbox.checked = false;}}function check(parentrow){var td = parentrow.firstChild;var box = td.firstChild;if(box.checked == false){box.checked = true;} else {box.checked = false;}}///////////////////////////////////////////////send comfirmfunction popconfirm(message){var agree=confirm(message);if (agree)return true ;elsereturn false ;}function confirmation(url) {var answer = confirm("Are you sure you want to Delete This link?")if(answer){window.location = url;}}function confirmationcat(url) {var answer = confirm("Deleting a Category will affect all sites associated with it!\nAre you sure you want to continue?")if(answer){window.location = url;}}function gotourl(url) {window.location = url;}function confirmmove(url){var agree=confirm("Are you sure you to Leave this page?");if (agree){window.location = url;return true ;} else {return false ;}}function confirmSubmit(message){var agree=confirm("Are you sure you to " + message);if (agree)return true ;elsereturn false ;}