var loc = self.location;
function callNow2(frm){
var isOk = false;
var loc=self.location;
var parameters="";
var usageValue, currencyWithValue, currencyWithoutValue
	for (var i=0;i<frm.usage.length;i++){
		if (frm.usage[i].checked){
		 isOk = true;
		  usageValue = frm.usage[i].value;
		 break;
		}else{
			isOk = false;
		}
	}
	if ( isOk == false){
			alert("Please select your <Usage type> i.e. for Internet Site or Presentation etc.");
			return false;
	}
	if (frm.format.value == "NS"){
			alert("Please select image format.");
			return false;
	
	}
return true;

}

////////////////////////////////////////////////////////////////////////////////////////
/////////// function for maps payment with watermark and without watermark /////////////
/////////////////////////date 11-03-2004///////////////////////////////////
function topframeimg(){
document.writeln('<table cellpadding="5" cellspacing="0" width="100%" border="0" bordercolor="blue">');
document.writeln('<tr>');
document.writeln('<td>');
Instructions();
document.writeln('</td></tr></table>');
}

//////////////////////////////////////////////////////////////////////////////////////////
/////////////////// end new array for header banners for moi internal pages /////////////////
//////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////functions for online map shopping cart////////////////////////
////////////////////////Implemented By lk on 2nd December 2003.///////////////////////
var x = 250;
var mapRates = new Array( new Array("project",(x),(x) * 2 ), new Array("presentation",(x*2),(x*2) * 2 ), new Array("brochure",(x*6),(x*6) * 2 ),  new Array("print",(x*12),(x*12) * 2 ), new Array("tv",(x*16),(x*16) * 2 ),  new Array("internet",(x*20),(x*20) * 2 ),  new Array("all",(x*24),(x*24) * 2 )); 

function callNow3(frm){
var pcode,pname;
var isOk = false;
var parameters="";
var usageValue, format, currency, rate;
rate=0;
var usdRate=43.5;
pcode="MOIIMG";
pname=self.location+"";
//pname=self.location;
i=pname.toLowerCase().indexOf("mapsofindia.com");
//alert(i);
if (i >-1){
	pname=pname.substring(i,pname.length);
}
	if (frm.usage.value == "NS"){
		alert("Please select your <Usage type> i.e. for Internet Site or Presentation etc.");
		return false;
	}else{
		usageValue = frm.usage.value;
	}
	if (frm.format.value == "NS"){
			alert("Please select image format.");
			return false;
	}else{
		format = frm.format.value;
	}
	
	//alert(usageValue);
	//alert(format);
	rate=getMapRate(usageValue,format);
	currency=frm.currency.value;
	if (currency == "usd"){
		rate=Math.ceil(rate/usdRate);
	}

	/*if (format.toLowerCase() == "withwatermark"){
		pname = pname.toLowerCase() + "-FOR-USE-IN-"+usageValue.toUpperCase()+"-WITH-WATERMARK"; 
	}else{
		pname = pname.toLowerCase() + "-FOR-USE-IN-"+usageValue.toUpperCase()+"-WITHOUT-WATERMARK"; 
	}*/

	if (format.toLowerCase() == "withwatermark"){
		usage="FOR-USE-IN-"+usageValue.toUpperCase()+"-WITH-WATERMARK"; 
	}else{
		usage="FOR-USE-IN-"+usageValue.toUpperCase()+"-WITHOUT-WATERMARK"; 
	}

	//////////////////////////////////////
	pcode+=rate; //added on 16 Mar 2004.
	/////////////////////////////////////
	
	//local path
	//parameters = "../../cart/" + currency + "/viewCart.html?" + pcode + "//" + pname + "//"+usage+"=" + rate + "//1";

	//remote path
	parameters = "http://www.mapsofindia.com/cart/" + currency + "/viewCart.html?" + pcode + "//" + pname + "//"+usage+"=" + rate + "//1";

	//alert(parameters);
	window.location.href=parameters;

//return true;
return false;
}

function getMapRate(strUsageValue,strFormat){
	for (var i=0;i<mapRates.length;i++){
		//alert(mapRates[i][0]);
		if (strUsageValue.toLowerCase() == mapRates[i][0].toLowerCase()){
			if (strFormat.toLowerCase() == "withwatermark"){

				return mapRates[i][1];
			}else{
				return mapRates[i][2];
			}
		}
	}
}
function Instructions(){

document.writeln('<form onsubmit="return callNow3(this);">');

//Stop Server Message
//<tr><td valign="top" bgcolor=teal colspan=2 align="center"><font style="font-family:verdana;color:white;font-size:11px;font-weight:bold;">Payment Gateway will be down from 1:00 to 2:30 and  5:30 to 7:00 IST on 20.12.2004 </font></td></tr>	

document.writeln('<table width="100%" cellpadding=1 cellspacing=1 border=0 bgcolor="#E0F0E0" align=center style="{font-family:verdana;font-size:10px;}"><tr><td colspan=2 bgcolor="#ff0000"><p align="justify"><font color="#ffffff" style="font-size:12px"><B>Use this image in your Presentations, Internet Sites, Magazines, Print Media, Circulations, Brochures or TV Channel. Mapsofindia.com reserves the right to act against any unauthorized use of its Intellectual Property. All our Financial transactions are through Verisign secure payment gateway.</B></font></p></td></tr><tr bgcolor="#E7F1E7" height="20">	<Td> <B>Choose usage:</B></td>	<td>		<select name="usage" style="{font-family:verdana;font-size:10px;font-weight:bold;}"><option value="NS" selected>Please select image Usage</option>	<option value="project">Project Report</option>		<option value="presentation">Presentation / Circulation</option>	<option value="brochure">Brochure</option>		<option value="internet">Internet site</option>		<option value="tv">TV Channel</option>		<option value="print">Print Media (Books, Newspapers, Magazines, Publication)</option>		<option value="all">All Uses</option>		</select>	</td>	</tr>	<tr bgcolor="#E7F1E7">	<Td valign="top"><B>Choose File Type:</B></td>	<td> 		<select name="format" style="{font-family:verdana;font-size:10px;font-weight:bold;}"><option value="NS" selected>Please select map image format</option><option value="withwatermark">With Watermark (logo)</option><option value="withoutwatermark">Without Watermark</option></select>	<B>Currency:</B> <select name="currency" style="{font-family:verdana;font-size:10px;font-weight:bold;}"><option value="inr">INR</option><option value="usd">USD</option></select>&nbsp;<input type=submit value="Buy Now" style="{font-family:verdana;font-size:10px; font-weight:bold;}">&nbsp;&nbsp;&nbsp;[<a href="http://www.mapsofindia.com/emrm.html" style="{color:blue;text-decoration:underline; font-weight:bold;}" onclick="return openeRates();">View Rates</a>]</td>	</tr><tr><Td colspan=2>You can also order these images in various sizes, styles, formats. We can also customize images for you as per your requirements. For more details Please write to <a href="mailto:gurmeet@infobase.co.in" class="links"><font style="font-size:11px;">gurmeet@infobase.co.in</font></a> with your requirement or call Gurmeet Singh at +91 9871399025 between 08:00 - 20:00 IST.</td></tr></table>');

document.writeln('</form>');

}
function openeRates(){
var ratesWin=window.open("http://www.mapsofindia.com/emrm.html","ratesWindow","width=400, height=190, toolbars=0");
return false;
}

//////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////

