/*
FILE: urlcheck.js
AUTHOR: BT
DATE: JAN 17 2008
PROJECT: lr v.1b
DESCRIPTION: url check on lightracing.com v1a.
TITLE: perm header redirect

PROJECT CREATED: DEC 26 2007
LAST UPDATED: JAN 21 2008
*/


//SET VARS CONFIGS
var v1bConfig	= ("true");

//check uri params
if (v1bConfig == "true") {
		//set cgi uri
		var urlCurrent = location.href;
		//redirect on on v1b
		if ( (urlCurrent.search('.cfm') < '0') & (urlCurrent.search('v1b/index-2.html') < '0') ) {
			if ( (urlCurrent.search('.html') > '0') & (urlCurrent.search('lightracing.com/index.html') > '0') ) {
		//if ( (urlCurrent.search('.cfm') > '0') & (urlCurrent.search('/v1b/') > '0') ) { //check for v1b .cfm
		var urlCurrent = urlCurrent.replace('.html', ".cfm");
		var urlCurrent = urlCurrent.replace('lightracing.com/index.html', "lightracing.com/v1b/index.html");
		//document.write(urlCurrent); //echo current uri
		document.location.href = (urlCurrent);
		}
	}
}

//check uri params
/* --------------------------------------------------------->
//check uri params
	//set cgi uri
	var urlCurrent = location.href;
		if ( (urlCurrent.search('.cfm') < '0') & (urlCurrent.search('/v1b/') < '0') ) {
			if ( (urlCurrent.search('.html') > '0') & (urlCurrent.search('lightracing.com/') > '0') ) {
		//if ( (urlCurrent.search('.cfm') > '0') & (urlCurrent.search('/v1b/') > '0') ) { //check for v1b .cfm
	var urlCurrent = urlCurrent.replace('.cfm', ".html");
	var urlCurrent = urlCurrent.replace('lightracing/', "lightracing/v1b/");
	document.write(urlCurrent); //echo current uri
	//document.location.href = (urlCurrent);
	}
}
*/
//check uri params
//perm header redirect JAN 17 2008
/*
<script language="javascript" type="text/javascript">
<!--
//check uri params
	//set cgi uri
	var urlCurrent = location.href;
		if ( (urlCurrent.search('.cfm') < '0') & (urlCurrent.search('/v1b/') < '0') ) {
			if ( (urlCurrent.search('.html') > '0') & (urlCurrent.search('lightracing.com/') > '0') ) {
		//if ( (urlCurrent.search('.cfm') > '0') & (urlCurrent.search('/v1b/') > '0') ) { //check for v1b .cfm
	var urlCurrent = urlCurrent.replace('.html', ".cfm");
	var urlCurrent = urlCurrent.replace('lightracing.com/', "lightracing.com/v1b/");
	//document.write(urlCurrent); //echo current uri
	document.location.href = (urlCurrent);
	}
}
//check uri params
//-->
</script>
*/
/*
//check uri params LIVE
	//set cgi uri
	var urlCurrent = location.href;
	var urlCurrent = urlCurrent.replace('.html', ".cfm");
	var urlCurrent = urlCurrent.replace('lightracing.com/', "lightracing.com/v1b/");
	document.write(urlCurrent); //echo current uri
	//document.location.href = (urlCurrent);
//check uri params
*/
/*
	<cfset urlCurrent = #CGI.REQUEST_URI#>
<cfoutput>	
<cfscript>
	if (find(".cfm", urlCurrent) eq "0" AND find("/v1b/", urlCurrent) eq "0" AND find(".html", urlCurrent) neq "0") {
		urlCurrent = replace(urlCurrent, '.html', '.cfm'); //.cfm -> .html
		urlCurrent = replace(urlCurrent, 'lightracing.com/', 'lightracing.com/v1b/'); //.cfm -> .html
	}
</cfscript>
	#urlCurrent#<br><br>
	#find("cfm", urlCurrent)#
</cfoutput>
*/