

if (window != top) top.location.href = location.href;

function xrcalc(ropt) {

var ns = parseFloat(document.getElementById("ns").value.replace(/,/g,""));
var nsf = parseFloat(document.getElementById("nsf").value.replace(/,/g,""));
var nsmod = parseFloat(document.getElementById("nsmod").value.replace(/,/g,""));
var nsfmod = parseFloat(document.getElementById("nsfmod").value.replace(/,/g,""));
var exterr = "";
var rootprice = 0;
var nestimate = 0;

if (isNaN(ns)==true){
exterr = exterr + "a";
}
if (isNaN(nsf)==true){
exterr = exterr + "a";
}
if (isNaN(nsmod)==true){
exterr = exterr + "a";
}
if (isNaN(nsfmod)==true){
exterr = exterr + "a";
}

if (exterr == ""){

if ((ns >= 0) && (nsf >= 0) && (nsmod >= 0 ) && (nsfmod >= 0)){

rootprice = parseFloat(unescape("%31%35%30%2E%30%30"));
modprice = parseFloat(unescape("%31%30%30%2E%30%30"));

nestimate = (ns * (rootprice)) + (nsf * (rootprice * parseFloat(unescape("%32%0A")))) + (nsmod * (modprice)) + (nsfmod * (modprice * parseFloat(unescape("%32%0A"))));

ns = ns.toFixed(0);
nsf = nsf.toFixed(0);
nsmod = nsmod.toFixed(0);
nsfmod = nsfmod.toFixed(0);
nestimate = nestimate.toFixed(2);

document.getElementById("ns").value = ns;
document.getElementById("nsf").value = nsf;
document.getElementById("nsmod").value = nsmod;
document.getElementById("nsfmod").value =nsfmod;
document.getElementById("nestimate").value = nestimate;

if (ropt == 1){

prcwin=window.open("","prcwin");

var now = new Date();
var year = now.getFullYear();

prcwin.document.write("<!DOCTYPE HTML PUBLIC \"-\/\/W3C\/\/DTD HTML 4.01\/\/EN\" \"http:\/\/www.w3.org\/TR\/html4\/strict.dtd\">\r");
prcwin.document.write("<html>\r");
prcwin.document.write("<head>\r");
prcwin.document.write("<meta http-equiv=\"Content-Type\" content=\"text\/html; charset=iso-8859-1\">\r");
prcwin.document.write("<meta http-equiv=\"Content-Script-Type\" content=\"text\/javascript\">\r");
prcwin.document.write("<title>Archreality: Project Estimate<\/title>\r");
prcwin.document.write("<!-- all content by Jonathan Feaster (http:\/\/www.archreality.com\/) -->\r");
prcwin.document.write("<\/head>\r");
prcwin.document.write("<body>\r");
prcwin.document.write("<h1>Archreality Project Estimate:<\/h1>\r");
prcwin.document.write("<p><b>New standard pages (*)(**)(***):<\/b><\/p>\r");
prcwin.document.write("<p>Quantity: " + ns + "<\/p>\r");
prcwin.document.write("<p><b>New Shockwave/Flash pages (*)(**)(***):<\/b><\/p>\r");
prcwin.document.write("<p>Quantity: " + nsf + "<\/p>\r");
prcwin.document.write("<p><b>Standard page modifications (*)(***):<\/b><\/p>\r");
prcwin.document.write("<p>Quantity: " + nsmod + "<\/p>\r");
prcwin.document.write("<p><b>Shockwave/Flash page modifications (*)(***):<\/b><\/p>\r");
prcwin.document.write("<p>Quantity: " + nsfmod + "<\/p>\r");
prcwin.document.write("<hr>\r");
prcwin.document.write("<p><b>Project Estimate:<\/b><\/p>\r");
prcwin.document.write("<p><b>$ " + nestimate + "<\/b><\/p>\r");
prcwin.document.write("<p><i>*Normal content per page usually consists of about 50-150 words and 5-10 graphics of assorted sizes.<\/i><\/p>\r");
prcwin.document.write("<p><i>**New pages generally require a design and development phase before implementation. 3 major design/development changes are included with basic rates. Additional design\/development changes may be subject to a fee in addition to basic rates.<\/i><\/p>\r");
prcwin.document.write("<p><i>***Optional advanced web design Rates (I.E.: Database development, shopping carts etc.) are applied as Dev\/Application services and thus vary by project.<\/i><\/p>\r");
prcwin.document.write("<hr>\r");
prcwin.document.write("<p>Estimated: " + now + "<br>copyright © " + year + " Archreality (<a href=\"http:\/\/www.lehandladakh.net\/\">http:\/\/www.archreality.com\/<\/a>) all rights reserved.<\/p>\r");
prcwin.document.write("<\/body>\r");
prcwin.document.write("<\/html>\r");
return true;

}

return true;

}
else {
alert("ERROR:\r\nOne or more fields is not greater than or equal to 0.");
return false;
}

}
else {
alert("ERROR:\r\nOne or more fields has an invalid entry.");
return false;
}

}

function xrrcalc() {

document.getElementById("ns").value = "0";
document.getElementById("nsf").value = "0";
document.getElementById("nsmod").value = "0";
document.getElementById("nsfmod").value ="0";
document.getElementById("nestimate").value = "0.00";

return true;

}

// google vad components

google_ad_client = "pub-0642353344985968";
google_ad_width = 120;
google_ad_height = 600;
google_ad_format = "120x600_as";
google_ad_type = "text_image";
google_ad_channel ="";
google_color_border = "E1E1E1";
google_color_bg = "636363";
google_color_link = "FFFFFF";
google_color_url = "FFFFFF";
google_color_text = "E1E1E1";

// -->