(function()
{
	function m(input)
	{
	   return (input != null ? '"' + input + '"' : '""');
	}
	function addvar(key, value)
	{
	   if (value) { window.ezcolumbia_cpn_url += '&' + key + '=' + value }
	}
	var a = document;
	var b = window;
	b.ezcolumbia_cpn_url = "http://www.ezcolumbia.com/coupons/showcpn.php?h=ezc";
	
//required variables
	
	//this is the id of the person using the couponsense
	addvar('clientid', b.ezcolumbia_cpn_client);
	//this is what type of couponsense they are showing
	//may either be service or restaurant
	addvar('type', b.ezcolumbia_cpn_type);
	
	
//optional variables
	
	//this is the id of the potential coupon owner (for example to only show coupons from a certain restaurant)
	//if this is not set user will get random/latest coupons
	addvar('listid', b.ezcolumbia_cpn_listid);
	
	//if getting random coupons, we may want to get the latest coupons instead of fully random
	addvar('randtype', b.ezcolumbia_cpn_randtype);
	
	//this is the max number of coupons to show
	//if this is not set, user will get a max of 5 coupons
	addvar('max', b.ezcolumbia_cpn_max);
	
	//this is a specific coupon to show (for example if you know what coupon you want to display)
	//if this is set, maxcoupons should be set to 1, if not, we will be sure to show this one
	addvar('cpnid', b.ezcolumbia_cpn_id);
	
	//in case we want coupons from a specific group and category
	addvar('group', b.ezcolumbia_cpn_group);
	addvar('cat', b.ezcolumbia_cpn_category);
	
	addvar('display', b.ezcolumbia_cpn_display); //695x76text or //170x280text
	addvar('winwidth', b.ezcolumbia_cpn_width);
	addvar('winheight', b.ezcolumbia_cpn_height);
	
	addvar('showbiz', b.ezcolumbia_cpn_showbiz);
	
	addvar('fgcolor', b.ezcolumbia_cpn_fgcolor);
	addvar('bgcolor', b.ezcolumbia_cpn_bgcolor);

	
	a.write('<iframe name="ezcolumbia_cpns_frame" width='+m(b.ezcolumbia_cpn_width)+" height="+m(b.ezcolumbia_cpn_height)+" frameborder="+m(b.ezcolumbia_cpn_frameborder)+" src="+m(b.ezcolumbia_cpn_url)+' marginwidth="0" marginheight="0" vspace="0" hspace="0" allowtransparency="true" scrolling="no">');
	
	a.write("</iframe>");

})()