⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 overlib.js

📁 关于java web开发动态网页的资料
💻 JS
📖 第 1 页 / 共 4 页
字号:
				}
			}
			if (!match) newPt[newPt.length++] = hookPt[i];
		}

		newPt[newPt.length++] = order;

	} else if (typeof order == 'object') {
		if (typeof fnRef == 'object') {
			newPt = newPt.concat(fnRef);
		} else {
			newPt[newPt.length++] = fnRef;
		}
		
		for (j = 0; j < hookPt.length; j++) {
			match = false;
			if (typeof fnRef == 'function' && hookPt[j] == fnRef) {
				continue;
			} else {
				for (i = 0; i < fnRef.length; i++) if (hookPt[j] == fnRef[i]) {
					match = true;
					break;
				}
			}
			if (!match) newPt[newPt.length++]=hookPt[j];
		}

		for (i = 0; i < newPt.length; i++) hookPt[i] = newPt[i];
		newPt.length = 0;
		
		for (j = 0; j < hookPt.length; j++) {
			match = false;
			for (i = 0; i < order.length; i++) {
				if (hookPt[j] == order[i]) {
					match = true;
					break;
				}
			}
			if (!match) newPt[newPt.length++] = hookPt[j];
		}
		newPt = newPt.concat(order);
	}

	hookPt = newPt;

	return hookPt;
}

////////
//  PLUGIN ACTIVATION FUNCTIONS
////////

// Runs plugin functions to set runtime variables.
function setRunTimeVariables(){
	if (typeof runTime != 'undefined' && runTime.length) {
		for (var k = 0; k < runTime.length; k++) {
			runTime[k]();
		}
	}
}

// Runs plugin functions to parse commands.
function parseCmdLine(pf, i, args) {
	if (typeof cmdLine != 'undefined' && cmdLine.length) { 
		for (var k = 0; k < cmdLine.length; k++) { 
			var j = cmdLine[k](pf, i, args);
			if (j >- 1) {
				i = j;
				break;
			}
		}
	}

	return i;
}

// Runs plugin functions to do things after parse.
function postParseChecks(pf,args){
	if (typeof postParse != 'undefined' && postParse.length) {
		for (var k = 0; k < postParse.length; k++) {
			if (postParse[k](pf,args)) continue;
			return false;  // end now since have an error
		}
	}
	return true;
}


////////
//  PLUGIN REGISTRATION FUNCTIONS
////////

// Registers commands and creates constants.
function registerCommands(cmdStr) {
	if (typeof cmdStr!='string') return;

	var pM = cmdStr.split(',');
	pms = pms.concat(pM);

	for (var i = 0; i< pM.length; i++) {
		eval(pM[i].toUpperCase()+'='+pmCount++);
	}
}

// Registers no-parameter commands
function registerNoParameterCommands(cmdStr) {
	if (!cmdStr && typeof cmdStr != 'string') return;
	pmt=(!pmt) ? cmdStr : pmt + ',' + cmdStr;
}

// Register a function to hook at a certain point.
function registerHook(fnHookTo, fnRef, hookType, optPm) {
	var hookPt, last = typeof optPm;
	
	if (fnHookTo == 'plgIn'||fnHookTo == 'postParse') return;
	if (typeof hookPts[fnHookTo] == 'undefined') hookPts[fnHookTo] = new FunctionReference();

	hookPt = hookPts[fnHookTo];

	if (hookType != null) {
		if (hookType == FREPLACE) {
			hookPt.ovload = fnRef;  // replace normal overlib routine
			if (fnHookTo.indexOf('ol_content_') > -1) hookPt.alt[pms[CSSOFF-1-pmStart]]=fnRef; 

		} else if (hookType == FBEFORE || hookType == FAFTER) {
			var hookPt=(hookType == 1 ? hookPt.before : hookPt.after);

			if (typeof fnRef == 'object') {
				hookPt = hookPt.concat(fnRef);
			} else {
				hookPt[hookPt.length++] = fnRef;
			}

			if (optPm) hookPt = reOrder(hookPt, fnRef, optPm);

		} else if (hookType == FALTERNATE) {
			if (last=='number') hookPt.alt[pms[optPm-1-pmStart]] = fnRef;
		} else if (hookType == FCHAIN) {
			hookPt = hookPt.chain; 
			if (typeof fnRef=='object') hookPt=hookPt.concat(fnRef); // add other functions 
			else hookPt[hookPt.length++]=fnRef;
		}

		return;
	}
}

// Register a function that will set runtime variables.
function registerRunTimeFunction(fn) {
	if (isFunction(fn)) {
		if (typeof fn == 'object') {
			runTime = runTime.concat(fn);
		} else {
			runTime[runTime.length++] = fn;
		}
	}
}

// Register a function that will handle command parsing.
function registerCmdLineFunction(fn){
	if (isFunction(fn)) {
		if (typeof fn == 'object') {
			cmdLine = cmdLine.concat(fn);
		} else {
			cmdLine[cmdLine.length++] = fn;
		}
	}
}

// Register a function that does things after command parsing. 
function registerPostParseFunction(fn){
	if (isFunction(fn)) {
		if (typeof fn == 'object') {
			postParse = postParse.concat(fn);
		} else {
			postParse[postParse.length++] = fn;
		}
	}
}

////////
//  PLUGIN REGISTRATION FUNCTIONS
////////

// Runs any hooks registered.
function runHook(fnHookTo, hookType) {
	var l = hookPts[fnHookTo], k, rtnVal = null, optPm, arS, ar = runHook.arguments;

	if (hookType == FREPLACE) {
		arS = argToString(ar, 2);

		if (typeof l == 'undefined' || !(l = l.ovload)) rtnVal = eval(fnHookTo+'('+arS+')');
		else rtnVal = eval('l('+arS+')');

	} else if (hookType == FBEFORE || hookType == FAFTER) {
		if (typeof l != 'undefined') {
			l=(hookType == 1 ? l.before : l.after);
	
			if (l.length) {
				arS = argToString(ar, 2);
				for (var k = 0; k < l.length; k++) eval('l[k]('+arS+')');
			}
		}
	} else if (hookType == FALTERNATE) {
		optPm = ar[2];
		arS = argToString(ar, 3);

		if (typeof l == 'undefined' || (l = l.alt[pms[optPm-1-pmStart]]) == 'undefined') {
			rtnVal = eval(fnHookTo+'('+arS+')');
		} else {
			rtnVal = eval('l('+arS+')');
		}
	} else if (hookType == FCHAIN) {
		arS=argToString(ar,2);
		l=l.chain;

		for (k=l.length; k > 0; k--) if((rtnVal=eval('l[k-1]('+arS+')'))!=void(0)) break;
	}

	return rtnVal;
}

////////
// OBJECT CONSTRUCTORS
////////

// Object for handling hooks.
function FunctionReference() {
	this.ovload = null;
	this.before = new Array();
	this.after = new Array();
	this.alt = new Array();
	this.chain = new Array();
}

// Object for simple access to the overLIB version used.
// Examples: simpleversion:351 major:3 minor:5 revision:1
function Info(version, prerelease) {
	this.version = version;
	this.prerelease = prerelease;

	this.simpleversion = Math.round(this.version*100);
	this.major = parseInt(this.simpleversion / 100);
	this.minor = parseInt(this.simpleversion / 10) - this.major * 10;
	this.revision = parseInt(this.simpleversion) - this.major * 100 - this.minor * 10;
	this.meets = meets;
}

// checks for Core Version required
function meets(reqdVersion) {
	return (!reqdVersion) ? false : this.simpleversion >= Math.round(100*parseFloat(reqdVersion));
}

//Function to invoke the loan calculator
function fetchCalcResults()
{
	
		
		
		//<?xml version="1.0" encoding="UTF-8" ?> <hom01><>0</autoPayments>  <>0</ccPayments>  <>0<ssociationFees>  <>0</otherObligations>  <>0.06</mortgageRate>  <>30</mortgageTerm>  <>0</downPayment>  <>0</propertyTaxes>    <>0.28</frontRatio>  <>0.36</backRatio>  </hom01> 
		
		//alert(getUnformattedValue(loanamount));
		var combinedIncome = document.getElementById("combinedIncome").value;
		
		var childSupport = document.getElementById("childSupport").value;
		var autoPayments = document.getElementById("autoPayments").value;
		var ccPayments = document.getElementById("ccPayments").value;
		var associationFees = document.getElementById("associationFees").value;
		var otherObligations = document.getElementById("otherObligations").value;
		var mortgageRate = document.getElementById("mortgageRate").value;
		var mortgageTerm = document.getElementById("mortgageTerm").value;
		var downPayment = document.getElementById("downPayment").value;
		var propertyTaxes = document.getElementById("propertyTaxes").value;
		var hazardInsurance = document.getElementById("hazardInsurance").value;		
		var frontRatio = document.getElementById("frontRatio").value;
		var backRatio = document.getElementById("backRatio").value;
		
		
	    	
	    	//Get all unformated values
	    	var unformattedcombinedIncome = getUnformattedValue(combinedIncome);
	    	var unformattedchildSupport = getUnformattedValue(childSupport);
	    	var unformattedautoPayments =  getUnformattedValue(autoPayments);
	    	var unformattedccPayments =  getUnformattedValue(ccPayments);
	    	var unformattedassociationFees =  getUnformattedValue(associationFees);
	    	var unformattedotherObligations =  getUnformattedValue(otherObligations);
	    	var unformattedmortgageRate =  getUnformattedValue(mortgageRate);
	    	unformattedmortgageRate = unformattedmortgageRate/100;
	    	var unformattedmortgageTerm =  getUnformattedValue(mortgageTerm);
	    	var unformatteddownPayment =  getUnformattedValue(downPayment);
	    	var unformattedpropertyTaxes =  getUnformattedValue(propertyTaxes);
	    	var unformattedhazardInsurance =  getUnformattedValue(hazardInsurance);
	    	var unformattedfrontRatio =  getUnformattedValue(frontRatio);
	    	//unformattedfrontRatio = unformattedfrontRatio/100;
	    	var unformattedbackRatio =  getUnformattedValue(backRatio);
	    	//unformattedbackRatio = unformattedbackRatio/100;
	    	
	    	
			var urltobecalled = "http://www.bfclosure.com/calculator/hom01/modify.php?combinedIncome="+unformattedcombinedIncome+'&childSupport='+unformattedchildSupport+'&autoPayments='+unformattedautoPayments+'&ccPayments='+unformattedccPayments+'&associationFees='+unformattedassociationFees+'&otherObligations='+unformattedotherObligations+'&mortgageRate='+unformattedmortgageRate+'&mortgageTerm='+unformattedmortgageTerm+'&downPayment='+unformatteddownPayment+'&propertyTaxes='+unformattedpropertyTaxes+'&hazardInsurance='+unformattedhazardInsurance+'&frontRatio='+unformattedfrontRatio+'&backRatio='+unformattedbackRatio;
	    //document.getElementById('insertResponse').innerHTML =  urltobecalled;
	    
	    //var urlstr="test";  
	    //alert("test");                                                                                                                     
	    
	    var request;  // The variable that makes Ajax possible!
		
		try{
			// Opera 8.0+, Firefox, Safari
			request = new XMLHttpRequest();
		} catch (e){
			// Internet Explorer Browsers
			try{
				request = new ActiveXObject("Msxml2.XMLHTTP");
			} catch (e) {
				try{
					request = new ActiveXObject("Microsoft.XMLHTTP");
				} catch (e){
					// Something went wrong
					alert("Your browser does not have AJAX support!");
					return false;
				}
			}
		}
		
		//alert(urltobecalled);
	    request.open("GET", urltobecalled , true);	// request XML from PHP with AJAX call 
	    //alert("urlstr"+urlstr)
	    request.onreadystatechange = function () 
	    {                                                                                                   
			if (request.readyState == 4) 
			{
				        var resp = request.responseText;
				        //document.getElementById('insertResponse').innerHTML = resp;
				        var xmlDoc = request.responseXML;
				        //alert(xmlDoc.xml);
				        var responseText = xmlDoc.documentElement.getElementsByTagName("responseText");
				        //alert(responseText[0].childNodes[0].nodeValue);
				        var responseText2 = xmlDoc.documentElement.getElementsByTagName("responseText2");
				        //alert(responseText2);
				        var responseText3 = xmlDoc.documentElement.getElementsByTagName("responseText3");
				        //alert(responseText3);
				        var responseText4 = xmlDoc.documentElement.getElementsByTagName("responseText4");
				        //alert(responseText4);
				        //var dispTable = xmlDoc.documentElement.getElementsByTagName("htmlDisplayTable");
				        //var chartUrl = xmlDoc.documentElement.getElementsByTagName("chartUrl");
				        var htmlDataTable = xmlDoc.documentElement.getElementsByTagName("htmlDataTable");
				        //alert(responseText[0].childNodes[0].nodeValue);
				        document.getElementById('insertResponse').innerHTML = responseText[0].childNodes[0].nodeValue;
				        document.getElementById('insertResponse2').innerHTML = responseText2[0].childNodes[0].nodeValue;
				        document.getElementById('insertResponse3').innerHTML = responseText3[0].childNodes[0].nodeValue;
				        document.getElementById('insertResponse4').innerHTML = responseText4[0].childNodes[0].nodeValue;
				        //document.getElementById('dispTable').innerHTML = dispTable[0].childNodes[0].nodeValue;
				        //document.getElementById('chartURL').innerHTML = chartUrl[0].childNodes[0].nodeValue;
				        document.getElementById('htmlDataTable').innerHTML = htmlDataTable[0].childNodes[0].nodeValue;
				        document.getElementById('insertResponse').scrollIntoView();
				        /*
				        document.getElementById('insertResponse').innerHTML = resp;
					document.getElementById('insertResponse').scrollIntoView();
					document.getElementById('addName').value = "";
					 document.getElementById('addCity').value = "";
					 document.getElementById('addZip').value = "";
					 document.getElementById('addUrl').value = "";
					 document.getElementById('addEmail').value = "";
					 document.getElementById('addComments').value = "";
					 document.getElementById("addPhone").value = "";
					 document.getElementById("addAddress").value = "";*/
			}                                                                                                                                        
		                                                                                                                
	}
	request.send(null);  
}
	


////////
// STANDARD REGISTRATIONS
////////
registerHook("ol_content_simple", ol_content_simple, FALTERNATE, CSSOFF);
registerHook("ol_content_caption", ol_content_caption, FALTERNATE, CSSOFF);
registerHook("ol_content_background", ol_content_background, FALTERNATE, CSSOFF);
registerHook("ol_content_simple", ol_content_simple, FALTERNATE, CSSCLASS);
registerHook("ol_content_caption", ol_content_caption, FALTERNATE, CSSCLASS);
registerHook("ol_content_background", ol_content_background, FALTERNATE, CSSCLASS);
registerPostParseFunction(checkPositionFlags);
registerHook("hideObject", nbspCleanup, FAFTER);
registerHook("horizontalPlacement", horizontalPlacement, FCHAIN);
registerHook("verticalPlacement", verticalPlacement, FCHAIN);
if (olNs4||(olIe5&&isMac)||olKq) olLoaded=1;
registerNoParameterCommands('sticky,autostatus,autostatuscap,fullhtml,hauto,vauto,closeclick,wrap,followmouse,mouseoff,compatmode');
///////
// ESTABLISH MOUSECAPTURING
///////

// Capture events, alt. diffuses the overlib function.
var olCheckMouseCapture=true;
if ((olNs4 || olNs6 || olIe4)) {
	olMouseCapture();
} else {
	overlib = no_overlib;
	nd = no_overlib;
	ver3fix = true;
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -