function preload_goback_moveon(buttonmodel){
switch (buttonmodel){
case 0:
MM_preloadImages('images/go_backo.gif');
case 1:
MM_preloadImages('images/move_ono.gif');
default:
MM_preloadImages('images/move_ono.gif','images/go_backo.gif');
}
}
function preload_securepagetabs(){
MM_preloadImages('images/whatiso.gif','images/helpo.gif','images/searchtabo.gif','images/helpo_endtab.gif');
}
function MM_preloadImages(){
var d=document;if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments;for(i=0;i<a.length;i++)
if(a[i].indexOf("#")!=0){ d.MM_p[j]=new Image;d.MM_p[j++].src=a[i];}}
}
function MM_findObj(n, d){
var p,i,x;if(!d) d=document;if((p=n.indexOf("?"))>0&&parent.frames.length){
d=parent.frames[n.substring(p+1)].document;n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n];for(i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);return x;
}
function MM_swapImgRestore(){
var i,x,a=document.MM_sr;for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_swapImage(){
var i,j=0,x,a=MM_swapImage.arguments;document.MM_sr=new Array;for(i=0;i<(a.length-2);i+=3)
if((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x;if(!x.oSrc) x.oSrc=x.src;x.src=a[i+2];}
}
function displayForgotPwdHelp( pageType , isDynamic ){
if(! isDynamic)isDynamic=false;
var siteStatScript = "<script language=\"JavaScript1.1\" type=\"text/javascript\"> " +
"function sitestat(ns_l){ns_l+=\"&ns__t=\"+(new Date()).getTime();ns_pixelUrl=ns_l;" +
"if(document.images){ns_1=new Image();ns_1.src=ns_l;}else " +
"document.write(\"<img src='+ns_l+' width='1' height='1'/>\");} " +
"sitestat(\'https://uk.sitestat.com/experian/busibody/s?PasswordFieldHelpPopupPage\');" +
"</script>" +
"<noscript>" +
"<img src=\"https://uk.sitestat.com/experian/busibody/s?PasswordFieldHelpPopupPage\" alt=\"\" width=\"1\" height=\"1\">" +
"</noscript>";
var htmlText = "<a href=\"javascript: showOrHideBlock( document.getElementById( 'getPassword' ) )\">Click here " +
"if you have forgotten your password.</a> If you don’t have a password, you can obtain " +
"one by registering with BUSIBODY." +
"<p><div id=\"getPassword\" style=\"display: none;\">" +
"<table border=\"0\" cellpadding=\"1\">" +
"<form class=\"minimal\" name=\"passwd\" method=\"get\" action=\"https://busibody.custhelp.com/cgi-bin/busibody.cfg/php/enduser/acct_passwd_email.php\">" +
"<input type=\"hidden\" name=\"p_sid\" value=\"xWSrr_gh\" />" +
"<input type=\"hidden\" name=\"p_lva\" value=\"\" />" +
"<input type=\"hidden\" name=\"p_sp\" value=\"\" />" +
"<input type=\"hidden\" name=\"p_li\" value=\"\" />" +
"<tr><td colspan=\"2\" style=\"font-size: x-small\">Please enter your email " +
"address below and your password will be sent to you shortly.</td></tr>" +
"<tr><td style=\"width: 45%\"><input name=\"p_userid\" type=\"text\" size=\"30\" maxlength=\"80\" /></td>" +
"<td class=\"btnenter\"><a href=\"javascript:document.forms[0].submit()\" title=\"Click here to submit\"></a></td></tr>" +
"</form>" +
"</table></div></p>";
htmlText=siteStatScript+htmlText;
openPopUpWindow( "", htmlText, isDynamic );
}
function displayRegisterHelp( isDynamic ){
if(! isDynamic)isDynamic=false;
var htmlText = "All new users of BUSIBODY must complete a simple registration form before completing your first purchase. " +
"This information is required to provide you with a VAT invoice.  If you do not fully complete all of the mandatory fields, " +
"you will not be able to make future BUSIBODY purchases.";
openPopUpWindow( "", htmlText, isDynamic );
}
function displayLtdCreditSummaryHelp( ){
var htmlText = "<div style=\"text-align: left\">" +
"<div style=\"font-weight: bold\">Risk Score</div>" +
"<p>The risk score is an analytical tool designed to highlight the strength, " +
"performance and ultimately the creditworthiness of each company in a single " +
"score. The score ranges from 0 to 100 with the lowest scoring companies carrying " +
"the highest risk.</p> " +
"<p>A score of zero denotes that either the company has failed, is no longer " +
"in existence (e.g. it is dissolved) or it can no longer apply for credit without " +
"reference to an external authority (e.g. a Receiver has been appointed). A score " +
"of 1 indicates that there has been a recent Intention to Dissolve or Petition " +
"for Winding-up.</p>" +
"<div style=\"font-weight: bold\">Credit Rating</div>" +
"<p>A credit rating is typically the average level of credit that might be required " +
"by a company, from one of its suppliers, over a 30-day trading period. The credit " +
"rating will vary according to the company's risk score and size. The maximum " +
"credit rating granted is £10 million and the minimum rating, above zero, is £500.</p>" +
"<div style=\"font-weight: bold\">Credit Limit</div>" +
"<p>A credit limit is assigned to accommodate those trading situations where the " +
"total exposure level will exceed the financial value of the credit rating. Such " +
"events could occur when an above average level of credit is sought or an additional " +
"order has been placed before the original one is due for settlement. The credit limit " +
"is a scaleable proportion of the credit rating. As a precautionary measure, Experian " +
"decreases the differential between the credit limit and the credit rating as the " +
"level of risk increases.</p>" +
"<div style=\"font-weight: bold\">Failure Odds</div>" +
"<p>The good / bad odds for each company are simply the likely odds of failure over " +
"the next twelve months. Therefore, a company with failure odds of 1 to 1 (probability " +
"of 1 in 2) is four times more likely to fail in this time period than another company " +
"with failure odds of 7 to 1 (probability of 1 in 8). The shorter the odds, therefore, " +
"the greater the risk of failure.</p>" +
"<div style=\"font-weight: bold\">Credit Opinion</div>" +
"<p>Whenever a company is considered to be a higher than average risk, text will be " +
"produced that will explain the risk status.</p>" +
"<p>Every company with a risk score will have concluding text, which will summarise " +
"the creditworthiness of the subject thereby putting the score into a risk context.</p>" +
"<div style=\"font-weight: bold\">Risk Bands</div>" +
"<p>For ease of use, we have categorised groups of risk scores into risk bands. This " +
"allows users to determine at a glance the overall level of risk that a company potentially " +
"poses to the credit grantor.</p>" +
"<p>The bands are represented graphically within the reports, and are as follows:</p>" +
"<table class=\"creditsummarypopup\"><tr><th class=\"creditsummarypopup\">Risk Score</th><th class=\"creditsummarypopup\">Risk Band</th></tr>" +
"<tr><td class=\"creditsummarypopup\" style=\"width: 50%\">0</td><td class=\"creditsummarypopup\">Dissolved or serious adverse information such as a liquidator, receiver or administrator appointment, a resolution to wind up, a winding up order, a meeting of creditors or a voluntary arrangement.</td></tr>" +
"<tr><td class=\"creditsummarypopup\">1</td><td class=\"creditsummarypopup\">Recent Winding-up Petition or Intention to Dissolve notice.</td></tr>" +
"<tr><td class=\"creditsummarypopup\">2-15</td><td class=\"creditsummarypopup\">Maximum Risk</td></tr>" +
"<tr><td class=\"creditsummarypopup\">16-25</td><td class=\"creditsummarypopup\">High Risk</td></tr>" +
"<tr><td class=\"creditsummarypopup\">26-50</td><td class=\"creditsummarypopup\">Above Average Risk</td></tr>" +
"<tr><td class=\"creditsummarypopup\">51-80</td><td class=\"creditsummarypopup\">Below Average Risk</td></tr>" +
"<tr><td class=\"creditsummarypopup\">81-90</td><td class=\"creditsummarypopup\">Low Risk</td></tr>" +
"<tr><td class=\"creditsummarypopup\">91-100</td><td class=\"creditsummarypopup\">Very Low Risk</td></tr></table>" +
"</div>";
var isDynamic=true;
openPopUpWindow( "", htmlText, isDynamic );
}
function displayNltdCreditSummaryHelp( ){
var htmlText = "<div style=\"text-align: left\">" +
"<div style=\"font-weight: bold\">Risk Score</div>" +
"<p>The Risk Score is an analytical tool designed to highlight the strength, performance and ultimately the " +
"creditworthiness of each business in a single score. The score ranges from 0 to 100 with the lowest scored " +
"businesses carrying the highest risk. A score of zero denotes that the business has failed (a score of 1 denotes " +
"that there is evidence of serious default e.g. high levels of County Court Judgments or accounts placed for " +
"collection).</p>" +
"<div style=\"font-weight: bold\">Credit Rating</div>" +
"<p>A Rating is typically the level of credit that might be required by a business, from one of its suppliers, over a " +
"30-day trading period. It is calculated as a proportion of identified size indicators and the percentage used to " +
"calculate the resulting figure will vary according to the business's risk score. The maximum Rating given is " +
"£100,000 and the minimum Rating, above zero, is £500.</p>" +
"<div style=\"font-weight: bold\">Credit Limit</div>" +
"<p>A Limit is assigned to accommodate those trading situations where the total exposure level will exceed the financial " +
"value of the credit rating. Such events could occur when an above average level of credit is sought or an additional " +
"order has been placed before the original one is due for settlement. The Limit is a scaleable proportion of the " +
"credit rating. As a precautionary measure, Experian decreases the differential between the Limit and the Rating as " +
"the level of risk increases.</p>" +
"<div style=\"font-weight: bold\">Failure Odds</div>" +
"<p>The good / bad odds for each business are simply the likely odds of failure over the next twelve months. Therefore, " +
"a business with odds of 2 to 1 is twenty five times more likely to fail in this time period than another business " +
"with odds of 50 to 1. The shorter the odds, therefore, the greater the risk.</p>" +
"<div style=\"font-weight: bold\">BUSIBODY Ratings</div>" +
"<p>Businesses are clustered together in bands of risk according to the good / bad odds. The BUSIBODY Rating system is " +
"designed to highlight the risk band into which each business's score falls. Businesses with a 'No BUSIBODY Rating' " +
"are the highest risk of all.</p>" +
"<div style=\"font-weight: bold\">Credit Opinion</div>" +
"<p>Text bullet points are displayed when a business has been scored down heavily on an important element of the " +
"scorecard. In general, the more the text that is generated, the weaker the business and, therefore, the lower the " +
"score. Every business with a numeric score will have a concluding sentence, which will summarise the " +
"creditworthiness of the subject thereby putting the score into a risk context.</p>" +
"<div style=\"font-weight: bold\">Risk Bands</div>" +
"<p>For ease of consumption, we have categorised groups of Risk scores into Risk Bands. This allows at a glance to " +
"determine the overall level of risk this business potentially poses to the credit grantor.</p>" +
"<p>The bands are as follows:</p>" +
"<table class=\"creditsummarypopup\"><tr><th class=\"creditsummarypopup\">Risk Score</th><th class=\"creditsummarypopup\">Risk Band</th></tr>" +
"<tr><td class=\"creditsummarypopup\" style=\"width: 50%\">91-100</td><td class=\"creditsummarypopup\">Very Low Risk</td></tr>" +
"<tr><td class=\"creditsummarypopup\">81-90</td><td class=\"creditsummarypopup\">Low Risk</td></tr>" +
"<tr><td class=\"creditsummarypopup\">51-80</td><td class=\"creditsummarypopup\">Below Average Risk</td></tr>" +
"<tr><td class=\"creditsummarypopup\">26-50</td><td class=\"creditsummarypopup\">Above Average Risk</td></tr>" +
"<tr><td class=\"creditsummarypopup\">16-25</td><td class=\"creditsummarypopup\">High Risk</td></tr>" +
"<tr><td class=\"creditsummarypopup\">2-15</td><td class=\"creditsummarypopup\">Maximum Risk</td></tr>" +
"<tr><td class=\"creditsummarypopup\">0-1</td><td class=\"creditsummarypopup\">Serious Adverse Information</td></tr></table>" +
"</div>";
var isDynamic=true;
openPopUpWindow( "", htmlText, isDynamic );
}
function formatMonthLong( monthNum ){
months = [ "January", "February", "March",
"April", "May", "June", "July",
"August", "September", "October",
"November", "December" ]
return ( ( -1 < monthNum ) && ( monthNum  < 12 ) ) ? months[ monthNum ] : "Month undetermined";
}
function generateYears( order, startYear, endYear, yearLength ){
var htmlText = "<option value=''>&nbsp;</option>"
if( order==1 ){
for( i=startYear;i<=endYear;i++ ){
var yearValue=yearLength==2 ? i.toString().substr( 2, 2 ):i;
htmlText = htmlText + " " + "<option value=" + yearValue + ">" + i + "</option>";
}
} else {
for( i=endYear;i>=startYear;i-- ){
var yearValue=yearLength==2 ? i.toString().substr( 2, 2 ):i;
htmlText = htmlText + " " + "<option value=" + yearValue + ">" + i + "</option>";
}
}
return htmlText;
}
function getBubbleHtml( text ){
var htmlText =
"<div class=\"bubbletext\">" +
text +
"</div>";
return htmlText;
}
function getNavigationTabs( includeStartNewSearch ){
if( typeof includeStartNewSearch == "undefined")includeStartNewSearch = true;
var startSearchString = "<a href=\"http://www.busibody.com/\" onmouseover=\"javascript:MM_swapImage('startsearch','','images/searchtabo.gif','');\" onmouseout=\"javascript:MM_swapImgRestore();\">" +
"<img src=\"images/searchtab.gif\" alt=\"Click here to buy your next report\" border=\"0\" id=\"startsearch\"/>" +
"</a>";
var startSearchTab = includeStartNewSearch ? startSearchString : "&nbsp;";
var helpPleaseTab = "<div id=\"nav2\">" +
"<a href=\"http://www.busibody.com/cc_helpmeplease.html\" onmouseover=\"javascript:MM_swapImage('help','','images/helpo.gif','');\" onmouseout=\"javascript:MM_swapImgRestore();\">" +
"<img src=\"images/help.gif\" border=\"0\" alt=\"Click here for help with BUSIBODY\" id=\"help\"/>" +
"</a>" +
"</div>";
if(!includeStartNewSearch){
helpPleaseTab = "<div id=\"nav2\">" +
"<a href=\"http://www.busibody.com/cc_helpmeplease.html\" onmouseover=\"javascript:MM_swapImage('help','','images/helpo_endtab.gif','');\" onmouseout=\"javascript:MM_swapImgRestore();\">" +
"<img src=\"images/help_endtab.gif\" border=\"0\" alt=\"Click here for help with BUSIBODY\" id=\"help\"/>" +
"</a>" +
"</div>";
}
var HTML="";
HTML += "<div id=\"nav1\">" +
"<a href=\"http://www.busibody.com/cc_whatisbusibody.html\" onmouseover=\"javascript:MM_swapImage('whatis','','images/whatiso.gif','');\" onmouseout=\"javascript:MM_swapImgRestore();\">" +
"<img src=\"images/whatis.gif\" alt=\"Click here to find out more about BUSIBODY\" border=\"0\" id=\"whatis\"/>" +
"</a>" +
"</div>"
+ helpPleaseTab +
"<div id=\"nav3\">" + startSearchTab + "</div>";
return HTML;
}
function getNavigationTabsSecure( includeStartNewSearch ){
var HTML="";
HTML += "<div id=\"nav1\">" +
"<a href=\"http://www.busibody.com/cc_whatisbusibody.html\" onmouseover=\"javascript:MM_swapImage('whatis','','images/whatiso.gif','');\" onmouseout=\"javascript:MM_swapImgRestore();\">" +
"<img src=\"images/whatis.gif\" alt=\"Click here to find out more about BUSIBODY\" border=\"0\" id=\"whatis\"/>" +
"</a>" +
"</div>" +
"<div id=\"nav2\">" +
"<a href=\"http://www.busibody.com/cc_helpmeplease.html\" onmouseover=\"javascript:MM_swapImage('help','','images/helpo.gif','');\" onmouseout=\"javascript:MM_swapImgRestore();\">" +
"<img src=\"images/help.gif\" border=\"0\" alt=\"Click here for help with BUSIBODY\" id=\"help\"/>" +
"</a>" +
"</div>" +
"<div id=\"nav3\">" +
"<a href=\"http://www.busibody.com/\" onmouseover=\"javascript:MM_swapImage('startsearch','','images/searchtabo.gif','');\" onmouseout=\"javascript:MM_swapImgRestore();\">" +
"<img src=\"images/searchtab.gif\" alt=\"Click here to buy your next report\" border=\"0\" id=\"startsearch\"/>" +
"</a>" +
"</div>";
return HTML;
}
function openPopUpWindow( title, displayContent, isDynamicPage ){
if( typeof isDynamicPage == "undefined" )isDynamicPage = false;
var SMALL_WINDOW_MAX_CONTENT_SIZE=1150;
var windowWidth=displayContent.length > SMALL_WINDOW_MAX_CONTENT_SIZE ? 600:300;
var windowHeight=displayContent.length > SMALL_WINDOW_MAX_CONTENT_SIZE ? 350:200;
var filePath = isDynamicPage ? "" : "";
var imageTag = "<img src=\"" + filePath + "images/busibody_figure_small.gif\">";
var popUpWindow = window.open( "", "", "width=" + windowWidth + ", height=" + windowHeight + ", status=no, resizable=yes, scrollbars=yes" );
var msgDoc=popUpWindow.document;
var msgText = "<html><head><link rel=\"stylesheet\" href=\"" + filePath + "css/cc_style.css\">" +
"<script type=\"text/javascript\" src=\"" + filePath + "javascript/cc_jscript_common.js\"></script>" +
"<title>BUSIBODY INFORMATION</title></head>" +
"<body class=\"popup\">" +
"<table style=\"width: 100%;\">" +
"<tr><td style=\"width: 20%;\">" + imageTag + "</td>" +
"<td style=\"font-size: large\">" + title + "</td></tr></table>" +
"<div style=\"text-align: left\">" +
"<p>" + displayContent + "<\p>" +
"</div>" +
"</body></html>";
msgDoc.write( msgText );
msgDoc.close();
}
function showOrHideBlock( divRef ){
divRef.style.display=( divRef.style.display=='none' ? 'block':'none' );
}
function stringReplace( originalString, findText, replaceText ){
var pos=originalString.indexOf( findText );
if( pos==-1||! findText )return originalString;
var lastpos=0;
var len=findText.length;
while ( pos!=-1 ){
preString=originalString.substring( 0, pos );
postString=originalString.substring( pos+len, originalString.length );
originalString=preString+replaceText+postString;
lastpos=pos;
pos=originalString.indexOf( findText, lastpos+1 )
}
return originalString;
}
function isTextEmpty(textObj){
if(textObj){
return (trim(textObj.value)=="");
} else {
return false;
}
}
function trim(argvalue){
if(argvalue){
var tmpstr=ltrim(argvalue);
return rtrim(tmpstr);
} else {
return "";
}
}
function ltrim(argvalue){
while (1){
if(argvalue.substring(0, 1)!= " ")
break;
argvalue=argvalue.substring(1, argvalue.length);
}
return argvalue;
}
function rtrim(argvalue){
while (1){
if(argvalue.substring(argvalue.length - 1, argvalue.length)!= " ")
break;
argvalue=argvalue.substring(0, argvalue.length-1);
}
return argvalue;
}
function GetServerPath(type){
var path="";
/*
SecureHTTPNoDir and NonSecureHTTPNoDir were added so the form.action
works correctly.
the /bicred/ was also hardcoded so that the promotion scripts can then search
for the http string, and then remove the directory name bicred.
PLEASE DO NOT ALTER THIS
*/
switch (type){
case "SecureHTTP":
path = "https://secure.busibody.com/";
break;
case "SecureHTTPNoDir":
path = "https://secure.busibody.com/";
break;
case "SecureUnix":
path = "/usr/netscape/server4.1/docs/bb-docroot/";
break;
case "NonSecureHTTP":
path = "http://www.busibody.com/";
break;
case "NonSecureHTTPNoDir":
path = "http://www.busibody.com/";
break;
default:
path="";
break;
}
return path;
}
function getKey(oEvent){
var key;
if(window.event){
key=window.event.keyCode;
} else if (oEvent){
key=oEvent.which;
} else {
return false;
}
return key;
}
function checkpaste(e){
var key=getKey(e);
if(window.event.ctrlKey){
if(key==86){
window.event.returnValue=false;
}
}
}
function isEmailAddress( address ){
var validRegEx=/^([\w\.\-'])+\@((\[?(\d{1,3}\.){3}(\d{1,3}){1}\]?)|(([\w-])+\.)+([\a-zA-Z]{2,4}))$/;
return ( validRegEx.test( address ) );
}
function valPartPostcode( postCode ){
if( postCode.length > 0 ){
postCode=postCode.replace( / /g, '' );
}
switch ( postCode.length ){
case 0:
return true;
case 1:
return false;
case 2:
return ( postCode.search( /[a-zA-Z]\d/ )!=-1 );
case 3:
var oneLetter=postCode.search( /[a-zA-Z][0-9]{2}/ );
var twoLetter=postCode.search( /[a-zA-Z]{2}[0-9]/ );
var digitInMid=postCode.search( /[a-zA-Z][0-9][a-zA-Z]/ );
return ( ( oneLetter!=-1 )||( twoLetter!=-1 )||( digitInMid!=-1 ) );
case 4: case 5: case 6: case 7:
var startsWithLetter=postCode.search( /^[a-zA-Z]/ );
var hasDigit =postCode.search( /\d/ );
return ( ( startsWithLetter!=-1 )&&( hasDigit!=-1 ) );
default:
return false;
}
}
function valPostcode( postCode ){
var masks=new Array();
masks[0]='ANNANAA';
masks[1]='ANNNAA';
masks[2]='AANANAA';
masks[3]='AANNAA';
masks[4]='ANANAA';
masks[5]='ANNAA';
masks[6]='AANNNAA';
var isCodeValid=false;
if( postCode ){
var regex=/ /g;
postCode=postCode.replace( regex,'' );
postCode=postCode.toUpperCase();
var codeMatches=new Array();
for( var x=0;x < masks.length;++x ){
codeMatches[ x ]=true;
if( postCode.length==masks[ x ].length ){
for( var i=0;i < postCode.length;++i ){
if( masks[ x ].substr( i, 1 )== 'A' ){
if( ("0123456789").indexOf( postCode.substr( i, 1 ) ) != -1 ){
codeMatches[ x ]=false;
break;
}
} else {
if( ("ABCDEFGHIJKLMNOPQRSTUVWXYZ").indexOf( postCode.substr( i, 1 ) ) != -1 ){
codeMatches[ x ]=false;
break;
}
}
}
} else {
codeMatches[ x ]=false;
}
if( codeMatches[ x ] ){
isCodeValid=true;
break;
}
}
}
return isCodeValid;
}
function getArgument(){
var args=getFormArgs();
for(var i=0;i < args.totelements;i++){
storeCookie( args[i] , args[args[i]] , INET_DOMAIN );
}
}
function getFormArgs(queryString){
var query;
if( arguments[0] ){
query=queryString;
} else {
query=location.search.substring(1);
}
var args=new Object();
var pairs = query.split(";");
for( var i=0;i < pairs.length;++i ){
var pos=pairs[i].indexOf('=');
if(pos==-1)continue;
var argname=pairs[i].substring(0, pos);
var value=pairs[i].substring(pos+1);
args[argname]=unescape(value);
args[i]=unescape(argname);
args.totelements=pairs.length;
}
return args;
}
function padFieldValue(value, padsize, padchar, position){
if(value.length < padsize){
for(i=value.length;i < padsize;i++){
if(position==0){
value=padchar+value
}
else {
value=value+padchar
}
}
}
return value
}
function formatNumber(val){
sVal=val.toString();
x = sVal.indexOf(".");
if(x!=-1){
sPence=sVal.substr(x+1);
sPounds=sVal.substr(0,x+1);
var Number = padFieldValue(sPence,2,"0",1);
Number=sPounds+Number;
}
else {
Number = sVal + ".00";
}
return Number;
}
function loaded(){
}
function showSampleReport( repType ){
var repTypes=Object();
repTypes["LTD"]  = "cc_ltd_big_report_sample.html";
repTypes["LTDBUSI"] = "cc_ltd_busi_report_sample.html";
repTypes["NLTD"] = "cc_nltd_big_report_sample.html";
repTypes["DIR"]  = "cc_dir_report_sample.html";
repTypes["IMG"]  = "images/experian-accts-2003.tiff";
window.open( GetServerPath( "NonSecureHTTP" ) + repTypes[repType] );
}
function applyDiscountLtdNltd(arPrices,arPrices1, arBigboost, arBusiboost, busi, big){
var applydiscount = trim( readCookie("sh") );
var idiscount=parseFloat(Discount);
if(applydiscount!=null){
if(applydiscount == "0050"){
for(var x=0;x<arPrices.length;x++){
var tmpBoostPrice=arPrices[x]*idiscount;
arPrices[x]=(parseFloat(arPrices[x])-tmpBoostPrice);
arPrices[x]=Math.ceil(arPrices[x]);
arPrices[x]=formatNumber(arPrices[x]);
}
for(var y=0;y<arPrices1.length;y++){
var tmpBoostPrice1=arPrices1[y]*idiscount;
arPrices1[y]=(parseFloat(arPrices1[y])-tmpBoostPrice1);
arPrices1[y]=Math.ceil(arPrices1[y]);
arPrices1[y]=formatNumber(arPrices1[y]);
}
for(var i=0;i<arBigboost.length;i++){
var tmp=arBigboost[i];
tmp[1]=formatNumber(Math.ceil(parseFloat(tmp[1])-(parseFloat(tmp[1])*idiscount)));
arBigboost[i]=tmp;
}
for(var i=0;i<arBusiboost.length;i++){
var tmp1=arBusiboost[i];
tmp1[1]=formatNumber(Math.ceil(parseFloat(tmp1[1])-(parseFloat(tmp1[1])*idiscount)));
arBusiboost[i]=tmp1;
}
var tmpRptPrice=parseFloat(busi)*idiscount;
busi=Math.ceil(parseFloat(busi)-tmpRptPrice);
busi=formatNumber(busi);
var tmpRptPrice1=parseFloat(big)*idiscount;
big=parseFloat(big)-tmpRptPrice1;
big=Math.ceil(big);
big=formatNumber(big);
PriceBusi=busi;
PriceBig=big;
}
}
}
function checkCookieAndStoreEmail(){
var tempUID = readCookie("TEMP_UID");
var loginUID = readCookie("LOGIN_EMAIL");
if(tempUID!=undefined&&tempUID!=""){
storeCookie("LOGIN_EMAIL", tempUID, INET_DOMAIN);
}
else {
if(loginUID==undefined){
document.location.href = GetServerPath( "SecureHTTP") + "cc_login_error.html?errorcode=99";
}
}
storeCookie("TEMP_UID", "", INET_DOMAIN);
}
function createAndStoreOrderID(frm){
var strDateTimeStamp=createDateTime();
var uID = "121537";
var uIDVal = readCookie("uniquecustid");
if(uIDVal!=undefined)uID=uIDVal;
frm.DK05_UNIQUEID.value=uID;
frm.DK05_ORDERID.value=uID+strDateTimeStamp;
}
function createDateTime(){
var d=new Date();
var secs= d.getSeconds();
secs=secs < 10 ? '0'+secs:secs;
var mins= d.getMinutes();
mins=mins < 10 ? '0'+mins:mins;
var hours= d.getHours();
hours=hours < 10 ? '0'+hours:hours;
var time=hours.toString()+mins.toString()+secs.toString();
var day=d.getDate();
day=day < 10 ? '0'+day: day;
var month=d.getMonth()+1;
month=month < 10 ? '0'+month: month;
var year=d.getFullYear();
var date=year.toString()+month.toString()+day.toString();
var datetime=date+time;
return datetime;
}
function showHideLoginSection(){
var el = document.getElementById("frmLoginReg");
if(hasUserLoggedIn()!= undefined){
el.style.display = "none";
}
else {
el.style.display="";
}
}
function hasUserLoggedIn(){
var loginEmail = readCookie("LOGIN_EMAIL");
return loginEmail;
}


