var config =
{
	oneentry_location : "oneentry_location",
	oneentry_type : "oneentry_type",
	oneentry_referer : "oneentry_referer",
	oneentry_format : "oneentry_format",
	oneentry_width : "oneentry_width",
	oneentry_height : "oneentry_height",
	oneentry_color_border : "oneentry_color_border",
	oneentry_color_title : "oneentry_color_title",
	oneentry_color_background : "oneentry_color_background",
	oneentry_color_text : "oneentry_color_text",
	oneentry_select_type : "oneentry_select_type",
	oneentry_select_form : "oneentry_select_form",
	oneentry_select_category : "oneentry_select_category",
	oneentry_select_keyword : "oneentry_select_keyword",
	oneentry_language : "oneentry_language",
	oneentry_test : "oneentry_test"
}
function getConfig(b)
{
	return config[b] || null
}
function getParamClean(key, value){
   if(key && value)
   {
      return "&" + key + "=" + value
   } else {
	return "";
	}
}
function getParam(name){
	return getParamClean(getConfig(name), window[name]);
}
function getParams(){
	var src = '';
	for(var name in config){
		src += getParam(name);
	}
	return src;
}
function getFormSource(){
	oneentry_location = location.href;
	var src = 'http://www.oneentry.com/serveForm?' + getParams();
	src = src.substring(0,2000);
	src = src.replace(/%\w?$/, "");
	return src;
}
function writeForm(){
	var a = document;
	var src = getFormSource();
	a.write('<iframe name="oneentry_frame" src="' + src + '" width=' + oneentry_width + " height=" + oneentry_height + " frameborder=" + 0 + ' marginwidth="0" marginheight="0" vspace="0" hspace="0" allowtransparency="true" scrolling="no">');
	a.write("</iframe>")
}
writeForm();