function confirmDelete()
{
    var agree=confirm("Are you sure you wish to delete this entry?");
    if (agree)
        return true;
    else
        return false;
}

function openWindow(url,winName,features) {
window.open(url,'','toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=1,resizable=0,width=640,height=540,left = 25,top = 25');
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,'','toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=1,resizable=0,width=640,height=540,left = 25,top = 25');
}

function popWindow(theURL,winName,features) { //v2.0
  window.open(theURL,'','toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=1,resizable=0,width=400,height=400,left = 25,top = 25');
}

function openCustom(URL,name,w,h){ 
	
		myW = 'width=' + w + ',';
		myH = 'height=' + h + ',';
		
		params = 'toolbars=1, scrollbars=0, location=0, statusbars=0, menubars=1, resizable=0';
			

		window.open(URL,name,myW + myH + params); 
}

function openC2(URL,name,w,h,p){ 
	
		myW = 'width=' + w + ',';
		myH = 'height=' + h + ',';
		
		params = p + 'toolbars=1, location=0, statusbars=0, menubars=1, resizable=0';
			

		window.open(URL,name,myW + myH + params); 
}

function openPopup(url,winName,features) {
	if (features.length > 0)
	{
		window.open(url,'',features);
	}
	else
	{
	window.open(theURL,'','toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=1,resizable=0,width=640,height=540,left = 25,top = 25');
	}
}

<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->
<!-- Original:  Russ (NewXS3@aol.com) -->
<!-- Web Site:  http://dblast.cjb.net -->

function copyit(theField) {
var tempval=eval("document."+theField)
tempval.focus()
tempval.select()
therange=tempval.createTextRange()
therange.execCommand("Copy")
}

  function setopen(id){
			div = "div_" + id;
			divElement = document.getElementById(div);
			divElement.className = "open";
		}
		
		function setclosed(id){
			div = "div_" + id;
			divElement = document.getElementById(div);
			divElement.className = "closed";
		}
		
function changeRule(theNumber) {
	var theRules = new Array();
	if (document.styleSheets[0].cssRules) {
		theRules = document.styleSheets[0].cssRules;
	} else if (document.styleSheets[0].rules) {
		theRules = document.styleSheets[0].rules;
	}
	theRules[theNumber].style.visibility = 'hidden';
}


function changecss(theClass,element,value) {
	//Last Updated on May 21, 2008
	//documentation for this script at
	//http://www.shawnolson.net/a/503/altering-css-class-attributes-with-javascript.html
	 var cssRules;
	 if (document.all) {
	  cssRules = 'rules';
	 }
	 else if (document.getElementById) {
	  cssRules = 'cssRules';
	 }
	 var added = false;
	 for (var S = 0; S < document.styleSheets.length; S++){
	  for (var R = 0; R < document.styleSheets[S][cssRules].length; R++) {
	   if (document.styleSheets[S][cssRules][R].selectorText == theClass) {
	    if(document.styleSheets[S][cssRules][R].style[element]){
	    document.styleSheets[S][cssRules][R].style[element] = value;
	    added=true;
		break;
	    }
	   }
	  }

	  if(!added){
	  if(document.styleSheets[S].insertRule){
			  document.styleSheets[S].insertRule(theClass+' { '+element+': '+value+'; }',document.styleSheets[S][cssRules].length);
			} else if (document.styleSheets[S].addRule) {
				document.styleSheets[S].addRule(theClass,element+': '+value+';');
			}
	  }
	 }
	}

		
function openFormW(){
window.open("","_popup","toolbars=0,location=0,width=350,height=400,left=100,top=100'");
return true;
}


/**
 * DHTML check all/clear all links script. Courtesy of SmartWebby.com (http://www.smartwebby.com/dhtml/)
 */

var form='emailForm' //Give the form name here

function SetChecked(val,chkName) {
dml=document.forms[form];
len = dml.elements.length;
var i=0;
for( i=0 ; i<len ; i++) {
if (dml.elements[i].name==chkName) {
dml.elements[i].checked=val;
}
}
}

function ValidateForm(dml,chkName){
len = dml.elements.length;
var i=0;
for( i=0 ; i<len ; i++) {
if ((dml.elements[i].name==chkName) && (dml.elements[i].checked==1)) return true
}
alert("Please select at least one record")
return false;
}


function $$(id){return document.getElementById(id);} 

function loader(ID,test)
{
  if(!test){test = 0;}
  
  var destination = ID;
  var d = document;
  
  var _docW = (d.width != undefined) ? d.width : d.body.offsetWidth;
  var _docH = Math.max(d.documentElement.clientHeight, d.documentElement.scrollHeight);
  if(window.innerHeight > _docH){ _docH = window.innerHeight;}
  _docH = Math.max(_docH,d.body.scrollHeight);
  if(d.documentElement.clientHeight > 0){_docW = d.documentElement.scrollWidth;}else{_docW = d.body.scrollWidth;}
 
  var _docS = (d.all ? Math.max(d.body.scrollTop,d.documentElement.scrollTop) : window.pageYOffset);
 
  var _docPH = (d.all ? Math.max(d.body.clientHeight,d.documentElement.clientHeight) : window.innerHeight);
  if(d.all){if(d.documentElement.clientHeight > 0){_docPH = d.documentElement.clientHeight;}}
  if(window.opera){_docPH = window.innerHeight;}

  //alert(_docW + ', ' + _docH + ', ' + _docS + ', ' + _docPH);

 
  if(!$$('sw_a_overlay'))
  {
    var sw_a = d.createElement('div');
    sw_a.style.display = 'none';
    sw_a.id = 'sw_a_overlay';
    d.getElementsByTagName('body').item(0).appendChild(sw_a);
  }
  else
  {
    var sw_a = $$('sw_a_overlay');
  }
    
  with (sw_a.style)
  {
    position = 'absolute'; backgroundColor = '#000'; left = '0px'; top = '0px'; zindex = 10001; filter = 'alpha(opacity=60)'; opacity = .60; /*width = _docW +'px';*/ width = '100%'; height = _docH +'px'; display = 'block';
  }


  if(!$$('sw_c_overlay'))
  {
    var sw_c = d.createElement('iframe');
    sw_c.id = 'sw_c_overlay';
    d.getElementsByTagName('body').item(0).appendChild(sw_c);
  }
  else
  {
    var sw_c = $$('sw_c_overlay');
  }

  if(document.all){sw_c.scrolling = 'yes'}; 
  sw_c.src = destination+'&test='+ test;
  
  with (sw_c.style)
  {
    position = 'absolute'; height = '500px'; display = 'none'; margin = '0px'; padding = '0px'; width = '780px'; border = '3px solid #e6e6e6'; 
	//top = (((_docPH-480)/2) + _docS + 20) + 'px'; 
	//left =  (((_docW - 780)/2) > 0 ? (((_docW - 780)/2) - 50) + 'px' : '10px'); 
	top = '50%';
	left = '50%'
	margin = '-238px 0px 0px -390px';
	//left = '103px'
	//margin = '-238px 0px 0px 0px';
	
	zindex = 10015;
  }
  sw_c.style.display = 'block';
  
  
  
    if(!$$('sw_d_overlay'))
  {
    var sw_d = d.createElement('div');
    sw_d.style.display = 'none';
    sw_d.id = 'sw_d_overlay';
    d.getElementsByTagName('body').item(0).appendChild(sw_d);
  }
  else
  {
    var sw_d = $$('sw_d_overlay');
  }

  with (sw_d.style)
  {
    width = '300px'; height = '24px'; position = 'absolute'; 
	//top = (((_docPH-500)/2) + _docS) + 'px'; 
	//left =  (((_docW - 800)/2) > 0 ? (((_docW - 800)/2) - 50) + 'px' : '10px'); 
	top = '50%';
	left = '50%'
	margin = '-262px 0px 0px -380px';
	//margin = '-268px 0px 0px 0px';
	background = 'url("/FEED/PS001/images/pop_tab_300_branded.gif") no-repeat 0px 0px'; zindex = 10010;
  }
  sw_d.innerHTML = '<div style="margin:4px 0px 0px 10px;float:left;"><a href="http://www.pollscout.com" target="_blank"><img src="/FEED/PS001/images/powered_by_pollscout.gif" border="0" /></a> </div><a href="javascript:sw_close();"><img onmouseover="this.src=\'/FEED/PS001/images/ico_close_on.gif\'" onmouseout="this.src=\'/FEED/PS001/images/ico_close_off.gif\'" src="/FEED/PS001/images/ico_close_off.gif" alt="Close" border="0" title="Close"  style="float:right;margin:5px 7px 0px 0px;" /></a>';
  sw_d.style.display = 'block';
}


function sw_close()
{
  $$('sw_a_overlay').style.display = 'none';
  $$('sw_c_overlay').style.display = 'none';
  /*$$('sw_b_overlay').style.display = 'none';*/
  $$('sw_d_overlay').style.display = 'none';
}