function linkpop(winurl, width, height, screen_location, resizable, location_bar, status_bar, scrollbars)
{
	var screenwidth  = screen.width;
	var screenheight = screen.height;
	var winwidth = width;
	var winheight = height;
	var wintop = 0;
	var winleft = 0;
	var winsettings = "";
	
	if (screen_location == 10 || winwidth == '')
	{
		winwidth = screenwidth - 8;
	}
	if (screen_location == 10 || winheight == '')
	{
		winheight = screenheight - 8;
	}
	
	// top left or full screen
	if (screen_location == 1 || screen_location == 10)
	{
		wintop = 0;
		winleft = 0;
	}
	// top center
	if (screen_location == 2)
	{
		wintop = 0;
		winleft = parseInt((screenwidth/2) - (winwidth/2));
	}
	// top right
	if (screen_location == 3)
	{
		wintop = 0;
		winleft = screenwidth - winwidth - 8;
	}
	// middle left
	if (screen_location == 4)
	{
		wintop = parseInt((screenheight/2) - (winheight/2));
		winleft = 0;
	}
	// middle center
	if (screen_location == 5)
	{
		wintop = parseInt((screenheight/2) - (winheight/2));
		winleft = parseInt((screenwidth/2) - (winwidth/2));
	}
	// middle right
	if (screen_location == 6)
	{
		wintop = parseInt((screenheight/2) - (winheight/2));
		winleft = screenwidth - winwidth - 8;
	}
	// bottom left
	if (screen_location == 7)
	{
		wintop = screenheight - winheight - 8;
		winleft = 0;
	}
	// bottom center
	if (screen_location == 8)
	{
		wintop = screenheight - winheight - 8;
		winleft = parseInt((screenwidth/2) - (winwidth/2));
	}
	// bottom right
	if (screen_location == 9)
	{
		wintop = screenheight - winheight - 8;
		winleft = screenwidth - winwidth - 8;
	}
	
	winsettings = 'top='+wintop+',left='+winleft+',height='+winheight+',width='+winwidth+',scrollbars='+scrollbars+',resizable='+resizable+',location='+location_bar+',status='+status_bar+',toolbar='+location_bar;
	
	window.open(winurl, '', winsettings);
}
function toggle(idx)
{
	obj = (document.all) ? document.all[idx]:document.getElementById(idx);
	if (obj.style.display == '')
	{
		obj.style.display='none';
	}
	else
	{
		obj.style.display='';
	}
}

function show(idx) {
	obj = (document.all) ? document.all[idx]:document.getElementById(idx);
	obj.style.display='';
}

function hide(idx) {
	obj = (document.all) ? document.all[idx]:document.getElementById(idx);
	obj.style.display='none';
}
function winOpen(goto,height,width){
	window.open(goto,null,"height="+height+",width="+width+",status=yes,toolbar=no,menubar=no,location=no,scrollbars=yes,resizable=yes");
}
 
function toggle_simple(idx) {
	var obj = document.getElementById(idx);
	if (obj.style.display == '') {
		obj.style.display='none';
	} else {
		obj.style.display='';
	}
}           

function change_country(val,targ) {
	//var list="AB,BC,MB,NB,NL,NT,NS,NU,ON,PE,QC,SK,YT"
	if (val == "AB" || val == "BC" || val == "MB"  || val == "NB" || val == "NL" || val == "NS" || val == "NU" || val == "ON" || val == "PE" || val == "BC" || val == "QC" || val == "SK" || val == "YT" ) {
		document.getElementById(targ).value="Canada";
	} else {
		document.getElementById(targ).value="USA";
	}
}
