var w = '<iframe id="adFrame" src="http://feeds.epinetwork.com/?ft=search-box-results';

var st=getURLVar('st');
if(st!=''){
	w+='&st='+st;
}else{
	if(window.keyword !== undefined) w+='&st='+keyword;
}



if(window.ad_id !== undefined) w+='&ad_id='+ad_id;

if(window.sid !== undefined) w+='&sid='+sid;

w+='&ref='+escape(window.location);

if(window.ua !== undefined) w+='&ua='+escape(navigator.userAgent);

w += '" frameborder="0" scrolling="no" allowtransparency="true" hspace="0" vspace="0" marginheight="0" marginwidth="0"';

if(window.height !== undefined) w+=' height="'+height+'"';
else w+=' height="90"';

if(window.width !== undefined) w+=' width="'+width+'"';
else w+='" width="768"';

w += '></iframe>';

document.write(w);

function getURLVar(urlVarName) {
	//divide the URL in half at the '?'
	var urlHalves = String(document.location).split('?');
	var urlVarValue = '';
	if(urlHalves[1]){
		//load all the name/value pairs into an array
		var urlVars = urlHalves[1].split('&');
		//loop over the list, and find the specified url variable
		for(i=0; i<=(urlVars.length); i++){
			if(urlVars[i]){
				//load the name/value pair into an array
				var urlVarPair = urlVars[i].split('=');
				if (urlVarPair[0] && urlVarPair[0] == urlVarName) {
					//I found a variable that matches, load it's value into the return variable
					urlVarValue = urlVarPair[1];
				}
			}
		}
	}
return urlVarValue;
}