
function selector(Name){ClassSel=document.getElementById(Name);if(ClassSel.className==''){ClassSel.className='highlight';}else{if(ClassSel.className=='highlight'){ClassSel.className='';}else{ClassSel.className='highlight';}}}
function confirmLink(theLink,theSqlQuery,option)
{if(theSqlQuery==''||typeof(window.opera)!='undefined'){return true;}
var is_confirmed=confirm(theSqlQuery);if(is_confirmed){JumpTo(option);}
return is_confirmed;}
function SplitPanelLeft(){if($('ddb_Left_split').value>=101){$('ddb_Left_split').value=100;}
$('ddb_Right_split').value=100-$('ddb_Left_split').value;}
function SplitPanelRight(){if($('ddb_Right_split').value>=101){$('ddb_Right_split').value=100;}
$('ddb_Left_split').value=100-$('ddb_Right_split').value;}
function DDBPageLink(){var ToPage=showModalDialog("popups/geturllink.php","","dialogWidth:320px; dialogHeight:280px; status:no; help:no");if(ToPage){JumpLocation=document.getElementById('Loc');JumpLocation.value=ToPage;}}
function popUpIconSelect(){Icon=showModalDialog("components/ddb/iconsel.php","","dialogWidth: 405px; dialogHeight: 338px; resizable: no; help: no; status: no; scroll: no; ");if(Icon!=null&&Icon!='undefined'){document.getElementById('PreviewIcon').src=Icon;document.getElementById('Data[Icon]').value=Icon;}}
function JumpTo(URL){window.location=URL;}
var PrevIcon=null;function SelectIcon(ItemID){SendImage=document.getElementById(ItemID).value;Folder=document.getElementById('SiteDir').value;document.getElementById('PreviewIcon').src='../../'+SendImage;if(PrevIcon==SendImage){PrevIcon=null;hide('PreviewPane');}else{PrevIcon=SendImage;show('PreviewPane');}}
function CheckSize(EField,SSet){Field=document.getElementById(EField);if(Field.value>SSet){alert('Image width cannot be greater than '+SSet+' pixels');Field.value=SSet;}}
var selected;var PrevClass;function bglight(Name,Highlight){if(Highlight==undefined){Highlight='highlight'}
if(selected!=Name){if(selected){sel=document.getElementById(selected);sel.className=PrevClass;}
bg=document.getElementById(Name);PrevClass=bg.className;bg.className=Highlight;selected=Name;}}
var selectednd
function MultiSelect(Name){bg=document.getElementById(Name);if(bg.style.backgroundColor=='#e4e4e4'){bg.style.backgroundColor='';}else{bg.style.backgroundColor='#e4e4e4';}}
function LightDOWN(Name,Color){TableName=document.getElementById(Name);if(TableName.style.backgroundColor==Color){TableName.style.backgroundColor='';}}
function LightUP(Name,Color){TableName=document.getElementById(Name);if(TableName.style.backgroundColor==''){TableName.style.backgroundColor=Color;}}
function ToolTip(ToolTip){}
function HideTip(){}
function ShowTip(){}
function Disable(Name){}
var items=1;var selected;var Checked;function DoCheck(Name,Button){if(Button==undefined){Button='Create'}
CreateButton=document.getElementById(Button);radio=document.getElementById(Name);if(radio.type=='radio'){radio.checked=true;}else{if(radio.checked!=true){radio.checked=true;Checked=true;if(CreateButton){CreateButton.disabled='';}}else{radio.checked=false;Checked=false;if(CreateButton){CreateButton.disabled='disabled';}}}}
function Enable(Button){CreateButton=document.getElementById(Button);if(CreateButton.disabled==true){CreateButton.disabled=false;}else{CreateButton.disabled=true;}}
function OneCheck(Name){CreateButton=document.getElementById('Create');radio=document.getElementById(Name);radio.checked=true;}
function HighLight(Name){bg=document.getElementById(Name);ElSel=bg.style.backgroundColor;if(ElSel!='#999999'){if(ElSel==''){bg.style.backgroundColor='#e5e5e5';}else{bg.style.backgroundColor='';}}}
function bglightM(Name){SelBG=document.getElementById(Name);if(SelBG.style.backgroundColor=='#e5e5e5'){SelBG.style.backgroundColor='';}else{SelBG.style.background='#e5e5e5';}}
function bglightsel(Name){SelBG=document.getElementById(Name);if(SelBG.style.filter=='alpha(opacity=30)gray'){SelBG.style.backgroundColor='';SelBG.style.filter='none';}else{SelBG.style.filter='alpha(opacity=30)gray';}}
function LowLight(Name){bg=document.getElementById(Name);bg.style.background='';if(selected!=undefined){sel=document.getElementById(selected);sel.style.background='#e4e4e4';}}
function bglight2(Name){if(selectednd==Name){bg.style.background='';selectednd=undefined;}else{if(selectednd){sel=document.getElementById(selectednd);sel.style.background='';}
bg=document.getElementById(Name);bg.style.background='#c3c4c5';selectednd=Name;}}
var selectedrd
function bglight3(Name){if(selectedrd==Name){bg.style.background='';selectedrd=undefined;}else{if(selectedrd){sel=document.getElementById(selectedrd);sel.style.background='';}
bg=document.getElementById(Name);bg.style.background='#d4d4d4';selectedrd=Name;}}
function setCheckboxes(the_form,do_check)
{var elts=(typeof(document.forms[the_form].elements['Data[][]'])!='undefined')?document.forms[the_form].elements['Data[][]']:(typeof(document.forms[the_form].elements['ImagesArray[]'])!='undefined')?document.forms[the_form].elements['ImagesArray[]']:document.forms[the_form].elements['Data[]'];var elts_cnt=(typeof(elts.length)!='Data[]')?elts.length:0;if(elts_cnt){for(var i=0;i<elts_cnt;i++){elts[i].checked=do_check;}}else{elts.checked=do_check;}
return true;}
function gray(foo){document.getElementById(foo).style.color="gray";}
function ungray(foo){document.getElementById(foo).style.color="";}
function grayout(foo){if(document.getElementById(foo).style.color=="none"){gray(foo);}else{if(document.getElementById(foo).style.color=="gray"){ungray(foo);}else{gray(foo);}}}
function MM_openBrWindow(theURL,winName,features){window.open(theURL,winName,features);}
function Expand(foo){document.getElementById(foo).img.src="smlfolder";}
function Colaps(foo){document.getElementById(foo).img.src="folder";}
function excol(foo){if(document.getElementById(foo).img.src=="folder"){show(foo);}else{if(document.getElementById(foo).img.src=="smlfolder"){hide(foo);}else{show(foo);}}}
function show(foo){document.getElementById(foo).style.display="block";}
function hide(foo){document.getElementById(foo).style.display="none";}
function toggle(foo){if(document.getElementById(foo).style.display=="none"){show(foo);}else{if(document.getElementById(foo).style.display=="block"){hide(foo);}else{show(foo);}}}
function openup(foo){document.getElementById(foo).style.display="block";}
function closeup(foo){document.getElementById(foo).style.display="none";}
function openclose(foo){if(document.getElementById(foo).style.display=="none"){openup(foo);}else{if(document.getElementById(foo).style.display=="block"){closeup(foo);}else{openup(foo);}}}
