var OID ="";
var LID ="";
var MP ="";
var useEfSch = false;
var searchByYsOnly = 0;

var trackinglink = "?WT.mc_id=bookmark";
function setBookmark(url,str) 
{
    if(str=='') 
        { str=url; }
    url = url + trackinglink;
    if (document.all) 
        { window.external.AddFavorite(url,str); }
    else 
    {
        if (window.sidebar)
        { window.sidebar.addPanel(str, url, ""); }
        else
        { alert('Press CTRL and D to add a bookmark to:\n"'+url+'".'); }
    }
} 
function popup(name,url,w,h)
{
    mywindow = window.open (url,name,"location=0,status=0,scrollbars=1,width="+w+",height="+h);
}
function showFaq()
{
    popup('eforcity_com_FAQ','https://www.hostedsupport.com/support/index.cfm?C=11383',800,600);
    //self.location.href='https://www.hostedsupport.com/support/index.cfm?C=11383';
}
function ifmeOnload()
{
	var wrapper = document.getElementById('frameWrapper');
	if(wrapper!=undefined)
	{
		wrapper.id = 'frameWrapperDone';
	}
	var frame = document.getElementById('DocIFrame');
	if(frame!=undefined)
	{
		frame.style.visibility = 'visible';
	}
}
function SearchRedirectPage() {  
	var stxt = document.getElementById("SearchBoxQueryTbx").value;	  
	if(stxt == "")
	{
		alert("You must input Search textbox");
		return false;
	}
	else
	{
		var isEfSchReady = true;
		if(searchByYsOnly == 1) {
			isEfSchReady = false;
		}
		var f = document.forms["SearchBoxFrm"];
		var divv = document.getElementById("TestImageDiv");
		divv.innerHTML = "";
		divv.innerHTML = "<img id=\"CSCheck\" onerror=\"SearchRedirectPage1(false);\" src=\"http://search10.itrimming.com/ITSearch/images/spacer.gif\" onload=\"SearchRedirectPage1(true);\" />";

		if(useEfSch == true && isEfSchReady == true) {

			if(typeof(OID) == 'undefined')
			{
				f.oid = "";
			}
			else
			{
				f.oid = OID;
			}

			if(typeof(LID) == 'undefined')
			{
				f.lid = "";
			}
			else
			{
				f.lid = LID;
			}

			if(typeof(MP) == 'undefined')
			{
				f.mp = "";
			}
			else
			{
				f.mp = MP;
			}

			f.action = "itsearch2.html"; 
		}
		else {
			f.action = "http://search.store.yahoo.com/cgi-bin/nsearch"; 
		}
		return true;
	}
}
function SearchRedirectPage1(result) {
	useEfSch = result; 
}
