//$version:  $
// NOTE:
// If these variable differ from page to page, set them via a function.
var pageName = "document.title";
var server = "location.hostname.toLowerCase()";
var channel = "eBay";

function BrowseHelp() {
	if (document.browse.browse.value != "") {
		window.location.href = document.browse.browse.value;
	}
}

function Pop (path, ficenter, price) {
	if (ficenter != "") {
		path = path + "?ficenter=1";
		if (price != "") {
			path = path + "&price=" + price;
		} else {
			path = path + "&price=0";
		}
		hw = window.open(path, "MonthlyPaymentCalc", "height=400,width=375,status=no,toolbar=no,menubar=no,location=no,resizable=yes,scrollbars=no,titlebar=no");
	} else {
		path = path + "?ficenter=";
		if (price != "") {
			path = path + "&price=" + price;
		} else {
			path = path + "&price=0";
		}
		hw = window.open(path, "MonthlyPaymentCalc", "height=290,width=375,status=no,toolbar=no,menubar=no,location=no,resizable=yes,scrollbars=no,titlebar=no");
	}
	hw.focus();
	return false;
}

var Vividence_Intercept_Likelihood = 0.1
var Vividence_Intercept_TaskKey = 'eBay_Motors_Path_2_11_03_INTERCEPT'

function HandleVividenceIntercept()
{ 
        try {
                if (Math.random() >= Vividence_Intercept_Likelihood) return;
                if (document.all.item('vividence_intercept_iframe')==null)
                document.body.insertAdjacentHTML('beforeEnd',"<IFRAME STYLE='display:none;' ID='vividence_intercept_iframe'></IFRAME>");
                window.vividenceConnectorWindow = 'primary';
                document.all('vividence_intercept_iframe').src = 'http://task.vividence.com/applications/intercept/filter_page.asp?ref=' + Vividence_Intercept_TaskKey;
        }
        catch(e){}
}

function AttachVividenceIntercept() {
	if (window.attachEvent) window.attachEvent('onload',HandleVividenceIntercept);
}


