/***************************************************
 determine the x position for each pulldown 
 menu based on browser type and width 
****************************************************/




// determine width of browser in px
function base_x(){
	var x;
	if(document.all){
		x = document.body.clientWidth;
	} else {
		x = window.innerWidth;
	}	
	return x;
}




/* 
 * clcose pop-up window 
*/


        function doclose(){
                 self.close();
                 return false;
        }




/* 
 * pop-up window functions
*/


function bswPopUp(url, name, width, height, scroll) {

	var properties = "scrollbars=" + scroll + ",width=" + width + ",height=" + height; 
	var bswPopUpWin = window.open(url, name, properties);
	bswPopUpWin.focus();
}



/*

Poll

*/



function seePollResults(site_root,f){
	
	var url = site_root + "/global_templates/PollResult.aspx?";
	
	for(i=0;i < f.poll.length; i++){
				
		if(f.poll[i].checked){					
			
			url += "poll=" + f.poll[i].value;
						
		}		
	}	
	
	url += "&catID=" + f.CatId.value + "&pID=" + f.pID.value;
	
	bswPopUp(url,"poll",300,300,'no');

	return false;
}

/*

Poll

*/



function seeQuizResults(site_root,f){
	
	var url = site_root + "/global_templates/PopQuizResult.aspx?";
	
	for(i=0;i < f.popquiz.length; i++){
				
		if(f.popquiz[i].checked){					
			
			url += "popquiz=" + f.popquiz[i].value;
			
			
						
		}		
	}	
	
	url += "&catID=" + f.SelectCatId.value + "&pqID=" + f.pqID.value;
	
	bswPopUp(url,"quiz",300,300,'no');
	
	//alert(url);
	return false;
}
