
var newWindow='';   
function OpenNewWindow(url,winName,width,height,left,top,scrollbars)
{
    newWindow=window.open(url,winName,"left=" + left + ",top=" + top +",width="+ width +",height=" + height + ",scrollbars="+scrollbars);   
    if (window.focus)
    {
        newWindow.focus()
    }
}
function IsImageOk(imgCtrlId,imageName) 
{
    var Image= document.getElementById(imgCtrlId);   
    if (!Image.complete) 
    {
        Image.src=appUrl+"images/"+imageName;   
    }
}
function Count(text,long)
{
   str = text.value;
   if(str.indexOf("=")>=0)
   {
     alert("Special Character ' = ' is not allowed.");
     text.value = str.substring(0,str.length-1);
   }
   if(str.indexOf("?")>=0)
   {
     alert("Special Character ' ? ' is not allowed.");
     text.value = str.substring(0,str.value.length-1);
   }
   if(str.indexOf("<")>=0)
   {
     alert("Special Character ' < ' is not allowed.");
     text.value = str.substring(0,str.length-1);
   }
   if(str.indexOf(">")>=0)
   {
     alert("Special Character ' > ' is not allowed.");
     text.value = str.substring(0,str.length-1);
   }
    var maxlength = new Number(long); // Change number to your max length.
    if(str.length > maxlength)
    {
       text.value = str.substring(0,maxlength);
        alert(" Only " + long + "characters are allowed.");
    }
}
function TrimValue(ctrlObjt) 
{
    str = ctrlObjt.value
    if (str != null) 
    {        
      var i;
      for (i=0; i<str.length; i++) 
      {            
          if (str.charAt(i)!=" ") 
          {                
             str=str.substring(i,str.length); 
             break;           
          }         
      }             
      for (i=str.length-1; i>=0; i--) 
      {            
          if (str.charAt(i)!=" ") 
          {                
              str=str.substring(0,i+1);  
              break;           
          }        
      }                 
      if (str.charAt(0)==" ") 
      {           
          ctrlObjt.value="";
      } 
      else 
      {            
        ctrlObjt.value=str;   
      }    
    }
    
 }
$(document).ready(function($){
					$('#accordion-1').dcAccordion({
						eventType: 'click',
						autoClose: true,
						saveState: true,
						disableLink: true,
						speed: 'slow',
						autoExpand: true,
						cookie	: 'dcjq-accordion-1',
						classExpand	 : 'dcjq-current-parent'
					});
					
				
});

