
//for cuteeditor
//array to hold all the editor ids as the page loads
var editors = new Array();

 //OnInitialized, go thru the array and look for each iframe. 
 //iframe of showing editors will be found
 function CuteEditor_OnInitialized(editor)
    {
        for (i=0; i<editors.length; i++)
            {      // alert(i + ' : ' + editors[i]);
                var ifrmMain = document.getElementById(editors[i]);
                if(ifrmMain)
                    {   //alert('found: ');
                        ifrmMain.allowTransparency = true;
                        ifrmMain.style.backgroundColor = 'transparent';
                    }
              }
    }   
                 
                        
//Picture Pop-up window
var myWind2 = null  
function newWindow(theURL)
	{
		var features = "scrollbars=yes,menubar=yes,resize=yes,width=660px,height=500px";
		var winName = "picWindow";
		
		// if window not open then open
		CloseMyWind2();
		
		//new window
		 myWind2 = window.open(theURL,winName,features);
	}
	function CloseMyWind2()
	{
		if(myWind2 != null)
		{
			if(!myWind2.closed) {
			//close existing, then open new
			myWind2.close();
			}
		}
	}
	
	//Pop-up window
var myWind2a = null;
function newWind2a(theURL, features)
	{
		var winName = "picWindowa";
		
		// if window not open then open
		CloseMyWind2a();

		//new window
		 myWind2a = window.open(theURL,winName,features);
		 myWind2a.focus();
	}

	function CloseMyWind2a()
	{
		if(myWind2a != null)
		{
			if(!myWind2a.closed) {
			//close existing, then open new
			myWind2a.close();
			}
		}
	}

//check delete
		function CheckDelete(index,cntrId)
		{
			var a = window.confirm("Are you sure you want to delete this item?");
			if(a == true)
			{
				//form1.submit;
				var theform = document.frmPg;
				theform.deleteItem.value = index;
				theform.cntrId.value = cntrId;				
				theform.submit();
			}			
		}

//help guides
var myWind4 = null;
function HelpHtm(theURL)
	{
		var features = "scrollbars=yes,menubar=yes,resize=yes,width=650px,height=500px";
		var winName = "hlpWindow";
		
		// if window not open then open
		CloseMyWind4();
		
		//new window
		 myWind4 = window.open(theURL,winName,features);
	}
	
	function CloseMyWind4()
	{
		if(myWind4 != null)
		{
			if(!myWind4.closed) {
			//close existing, then open new
			myWind4.close();
			}
		}
	}