﻿// JScript File

function ToggleEditorDisplay( divClientID, imgClientUrl, expandImageUrl, minimizeImageUrl ) {

    var el = document.getElementById(divClientID) ;
    if( el.style.display=='none' ) {
        el.style.display='';
        document.images[imgClientUrl].src= minimizeImageUrl;
    } else {
        el.style.display='none';
        document.images[imgClientUrl].src= expandImageUrl;
    }
}




function DisplayDialog(url, opts, name) {
	if( opts == null || opts == "undefined" )
		opts = "width=300,height=250,resizable=yes,status=no,scrollbars=yes" ;
		
	var winName = (name) ? winName : "" ;
	
	if( DisplayDialog.arguments.length >= 2 )
		opts =  DisplayDialog.arguments[1] ;
		
	var hwnd = window.open( url, winName, opts ) ;
	if( (document.window != null ) && (!hwnd.opener) )
		hwnd.opener = document.window ;
		
	hwnd.moveTo( 80, 80 ) ;
}



function DoCatalogPostBack(postBackReference, returnValue) {
    eval(postBackReference.replace("[[WEBPART]]", returnValue));
}

function toggle_visibility (id, visible) 
{
    var e = document.getElementById(id);
    if (e != null)
    {
        if (visible)
            e.style.display = 'block';
        else
            e.style.display = 'none';
    }
}
