    var ns4 = (document.layers) ? true : false;  // Netscape 4.x or higher?
    var ie4 = (document.all) ? true : false;  // IE 4.x or higher?

    function critter( which ) { // get CSS object associated with entity
      divname = (ns4) ? which.name : which.id;
      var css = (ns4) ? document.layers[ divname ] : ( (ie4) ? document.all[ divname ] : null );
      return css;
    }

    function heat( which ) { // change link style to highlight
      var css = critter( which );
      if ( ns4 ) css.bgColor = '#ffff99';
      else css.className = 'hot';
    }

    function cool( which ) { // change link style to de-highlight
      var css = critter( which );
      if ( ns4 ) css.bgColor = '#e0e0e0';
      else css.className = 'cold';
    }


function throwUpDims(url, winwidth, winheight, winleft, wintop) {

parameters = "toolbar=0,location=1,directories=0,status=0,resizable=yes,menubar=0,scrollbars=1,width="+winwidth+",height="+winheight+",left="+winleft+",top="+wintop;
var d = new Date();
var secs = ""+d.getSeconds();
link = window.open(url,secs,parameters);
}

    var links = null
    function throwUp( url ) { // open url in a child window
      if (links != null && links.closed == false) links.close();
      links = window.open(url, "links", "dependent=0,height=400,width=500,scrollbars=yes,resizable=yes");
    }

	function throwFixedWindow(fileName){
	var w1=screen.width;
	w1-=75;
	var h1=screen.height;
	h1-=75; 
var d = new Date();
var secs = ""+d.getSeconds();
	newWin=window.open(fileName,secs,'x=0,y=0,toolbar=no,location=1,directories=no,status=no,scrollbars=yes,resizable=no,copyhistory=no,width='+w1+',height='+h1+',screenX=0,screenY=0,left=0,top=0');
	}
function throwPollResult(){
	index = 0
	total = document.poll.number_of_options.value;
	for (i=0;i<total;i++)
	{
		if (document.poll.option[i].checked)
			index = i;
	}
	var optionId = document.poll.option[index].value;
	var pollId = document.poll.pollId.value;
	var url="http://www.marketingtechie.com/test/poll-result.asp?pollId=" + pollId + "&optionId=" + optionId;
	alert(url);
	window.open(url,'win1','x=0,y=0,toolbar=no,location=no,directories=no,status=no,scrollbars=yes,resizable=no,copyhistory=no,width=305,height=320,screenX=0,screenY=0,left=0,top=0');
}
