var cnt = 0;

function fnShowHideInstances(sID){
  if(document.getElementById(sID).style.display == 'none'){
     document.getElementById(sID).style.display = '';
     document.getElementById('img_' + sID).src = '/images/downArrow.gif';
		 cnt++;
  } else{
     document.getElementById(sID).style.display = 'none';
     document.getElementById('img_' + sID).src = '/images/rightArrow.gif';
		 cnt--;
  }

}

function toggleLayer( whichLayer )
{
  var elem, vis;
  if( document.getElementById ) // this is the way the standards work
    elem = document.getElementById( whichLayer );
  else if( document.all ) // this is the way old msie versions work
      elem = document.all[whichLayer];
  else if( document.layers ) // this is the way nn4 works
    elem = document.layers[whichLayer];
  vis = elem.style;
  // if the style.display value is blank we try to figure it out here
  if(vis.display==''&&elem.offsetWidth!=undefined&&elem.offsetHeight!=undefined)
    vis.display = (elem.offsetWidth!=0&&elem.offsetHeight!=0)?'block':'none';
  vis.display = (vis.display==''||vis.display=='block')?'none':'block';
}

function formHandler(form){
  var URL = document.form.numPerPage.options[document.form.numPerPage.selectedIndex].value;
  window.location.href = URL;
}


function clearField(field) {
    field.value = "";
}

function ChangeInput() {
	if(document.getElementById('fileType').options[document.getElementById('fileType').selectedIndex].value == 'url'){
		document.getElementById('filename').type="text";
		document.getElementById('lbl_filename').text="Enter your URL";			
  } else{
		document.getElementById('lbl_filename').text="Select your File:";
		document.getElementById('filename').type="file";
  }
	}


function submitform(name){
	document.linkEvent.submit();
}

function clockFromString(time){
	document.write('<div id="prp_clock" align="center">');
	for (var i=0; i < time.length; i++) {
		if (time.charCodeAt(i) >= 48 && time.charCodeAt(i) <= 57) {
			document.write('<img src="/images/a2/clock/digit_' + time.charAt(i) + '.gif" alt="' + time.charAt(i)+ '">');
		} else if (time.charCodeAt(i) == 58){
			document.write('<img src="/images/a2/clock/digit_' + time.charCodeAt(i) + '.gif" alt="' + time.charAt(i)+ '">');		
		} else if ( time.charCodeAt(i) == 46) {
		  break;
		}
	}
	document.write('</div>');
}

function FC_Rendered(DOMId){
	//This method is called whenever a FusionCharts chart is loaded.
  //Check if it's the required chart using ID
  if (DOMId=="myChart1"){

  }



}


