
function changeCSS()
{
	var browser=navigator.appName;
	var ua = navigator.userAgent;
	var MSIEOffset = ua.indexOf("MSIE ");
	IEVersion= parseFloat(ua.substring(MSIEOffset + 5, ua.indexOf(";", MSIEOffset)));

	if ((browser=="Microsoft Internet Explorer")&& (IEVersion<7))
	{
		//alert("ie6");
		document.write('<link rel="stylesheet" type="text/css" href="css/greenIE6.css">');
	}
	else
	{
		//alert("ie7");
		document.write('<link rel="stylesheet" type="text/css" href="css/green.css">');
	}
}   


function downloadPDF(pdffile)
{
//alert(pdfPath);
    document.getElementById("action").value="downloadPDF";
	 document.getElementById("hidPDF").value=pdffile;
    document.pageform.submit();

}


/************************************* Speaker Box Rotation JS********************************/
var i=1;
function changeSpeaker()
{
	try 
	{
		clearTimeout(to);
	} catch (e) {}

	to = setTimeout("nextSpeaker();", 5000);//5 sec
}

function nextSpeaker()
{
	//alert("dfgd");
	if(i<5)
		i=i+1;			
	else
		i=1;
		
	//alert(i);
	for(var j=1;j<6;j++){
		if(j==i)
	        document.getElementById("speaker"+i).style.display="";
		else
			document.getElementById("speaker"+j).style.display="none";
				
	}
		
	changeSpeaker();
}

function gotoHome(){
	
	setTimeout("gotoHomePage()",10000);
	
}

function gotoHomePage()
{
	window.location = "home.html";
}

/************************************************************************************************/

function getHTTPObject()
{
	var xmlhttp;  
    /*@cc_on
    @if (@_jscript_version >= 5)
    try {
    xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
    } catch (e) {
    try {
    xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
    } catch (E) {
    xmlhttp = false;
    }
    }
    @else
    xmlhttp = false;
    @end @*/
    if (!xmlhttp && typeof XMLHttpRequest != 'undefined') 
	{
		try 
		{
			xmlhttp = new XMLHttpRequest();
		} 
		catch (e) 
		{
			xmlhttp = false;
		}
	}
	return xmlhttp;
}

function viewgreenpower()
{
	document.getElementById('greenpower').style.display="";	
	document.getElementById('imggreenpowerminus').style.display="";	
	document.getElementById('imggreenpowerplus').style.display="none";	
}
function notviewgreenpower()
{
	document.getElementById('greenpower').style.display="none";
	document.getElementById('imggreenpowerplus').style.display="";	
	document.getElementById('imggreenpowerminus').style.display="none";
}

function viewgreenit()
{
	document.getElementById('greenit').style.display="";
	document.getElementById('imggreenitminus').style.display="";	
	document.getElementById('imggreenitplus').style.display="none";
}

function notviewgreenit()
{
	document.getElementById('greenit').style.display="none";
	document.getElementById('imggreenitplus').style.display="";	
	document.getElementById('imggreenitminus').style.display="none";
}

function viewgreenbuilding()
{
	document.getElementById('greenbuild').style.display="";	
	document.getElementById('imggreenbuildminus').style.display="";	
	document.getElementById('imggreenbuildplus').style.display="none";
}

function notviewgreenbuilding()
{
	document.getElementById('greenbuild').style.display="none";
	document.getElementById('imggreenbuildplus').style.display="";	
	document.getElementById('imggreenbuildminus').style.display="none";
}

function viewgreenfuel()
{
	document.getElementById('greenfuel').style.display="";	
	document.getElementById('imggreenfuelminus').style.display="";	
	document.getElementById('imggreenfuelplus').style.display="none";
}

function notviewgreenfuel()
{
	document.getElementById('greenfuel').style.display="none";
	document.getElementById('imggreenfuelplus').style.display="";	
	document.getElementById('imggreenfuelminus').style.display="none";
}


function viewkeynotes()
{
	keynote.innerHTML='';
	keynote.innerHTML +="<div style='margin:5px 0px;font-size:9pt;color:black'> <p><b >What is a Keynote/Plenary Session?</b> A great keynote speaker will set the tone for the Green Energy Summit 2009 and create an audience of a single mind. The keynote should positively influence the audience for the entire event and beyond, when they return to their professional lives. The Keynote speaker slot is reserved for sponsors with top billing, and has duration of 20 minutes.</p></div>";
	document.getElementById('imgkeynoteminus').style.display="";	
	document.getElementById('imgkeynoteplus').style.display="none";
}

function notviewkeynotes()
{
	keynote.innerHTML='';
	document.getElementById('imgkeynoteplus').style.display="";	
	document.getElementById('imgkeynoteminus').style.display="none";
}

function viewfocus()
{
	focus1.innerHTML='';
	focus1.innerHTML +="<div style='margin:5px 0px;font-size:9pt;color:black'> <p><b>What is a Focused Session?</b> A focused session is a presentation of length 15-22 minutes, including Q & A time. During this session, you will hold forth on a focused issue/technology/project/innovation and impact the audience positively. A focused Session is a great medium to connect with exactly the audience you are after, and then pursue 1-1 or group discussions at the variety of networking opportunities that are embedded into the Green Energy Summit 2009 program agenda.</p></div>";
	document.getElementById('imgfocusminus').style.display="";	
	document.getElementById('imgfocusplus').style.display="none";
}

function notviewfocus()
{
	focus1.innerHTML='';
	document.getElementById('imgfocusplus').style.display="";	
	document.getElementById('imgfocusminus').style.display="none";
}

function viewpanel()
{
	panel1.innerHTML='';
	panel1.innerHTML +="<div style='margin:5px 0px;font-size:9pt;color:black'> <p><b>What is a Power Panel?</b> A power panel is comprised of a moderator and upto 5 panel participants (minimum 4). To submit your proposal for a power panel, you have to be an articulate moderator with in-depth knowledge of the topic area that you plan to cover in the panel discussion. You should also be capable of identifying and putting together the panel in consultation with the Green Energy Summit 2009 conference chair. Each power panel is of 90-minute duration including Q & A time.</p></div>";
	document.getElementById('imgpanelminus').style.display="";	
	document.getElementById('imgpanelplus').style.display="none";
}

function notviewpanel()
{
	panel1.innerHTML='';
	document.getElementById('imgpanelplus').style.display="";	
	document.getElementById('imgpanelminus').style.display="none";
}


function viewcase()
{
	case1.innerHTML='';
	case1.innerHTML +="<div style='margin:5px 0px;font-size:9pt;color:black'> <p><b>What is a Case Study Presentation?</b> A case study presentation provides the opportunity to showcase a green energy project/innovation that has already created a positive impact within the four tracks envisioned for Green Energy Summit 2009. This presentation of 20-30 minute duration should provide real-life examples of how the project/innovation has created a positive impact and draw parallels of how they can be replicated in the Indian renewable energy context.</p></div>";
	document.getElementById('imgcaseminus').style.display="";	
	document.getElementById('imgcaseplus').style.display="none";
}

function notviewcase()
{
	case1.innerHTML='';
	document.getElementById('imgcaseplus').style.display="";	
	document.getElementById('imgcaseminus').style.display="none";
}
function viewbof()
{
	bof1.innerHTML='';
	bof1.innerHTML +="<div style='margin:5px 0px;font-size:9pt;color:black'> <p><b>What is a Birds of Feather (BoF) Discussion?</b> The BoF program is a community discussion forum where people with similar interests can flock together and discuss their research, findings, and muster support for ensuring the success of their roadmap. These are informal discussions that can last from 90-120 minutes.</p></div>";
	document.getElementById('imgbofminus').style.display="";	
	document.getElementById('imgbofplus').style.display="none";
}

function notviewbof()
{
	bof1.innerHTML='';
	document.getElementById('imgbofplus').style.display="";	
	document.getElementById('imgbofminus').style.display="none";
}
function viewhow()
{
	how1.innerHTML='';
	how1.innerHTML +="<div style='margin:5px 0px;font-size:9pt;color:black'> <p><b>What are Hands-on-Workshops?</b> Hands-on workshops are in-depth sessions on a specific issue/technology/project/innovation that will transport the participants from any given level (beginner -> intermediate -> advanced -> expert -> and so on) to the next. Each hands-on workshop is of 180 minutes duration, and the speaker should be an expert in the area of presentation.</p></div>";
	document.getElementById('imghowminus').style.display="";	
	document.getElementById('imghowplus').style.display="none";
}

function notviewhow()
{
	how1.innerHTML='';
	document.getElementById('imghowplus').style.display="";	
	document.getElementById('imghowminus').style.display="none";
}
function loadProposal()
{	
	//presentation=document.getElementById("presentation").innerHTML;
	presentation.innerHTML='';
	index=document.getElementById("proposalno").selectedIndex;
	
	for(i=1;i<=index+1;i++)
	{
	//presentation=document.getElementById("presentation").innerHTML;
	presentation.innerHTML +="<div>";
		presentation.innerHTML +="<div style='padding: 10px 0px 0px 0px;width:0px;float:left;border:0px solid;'>";
			presentation.innerHTML +="<div class='proposals'>Proposal #"+i+"</div>";
			presentation.innerHTML +="<div class='clear'></div>";
			presentation.innerHTML +="<div id='presentInner' style='border:1px solid #E7E9E9;height:100px;margin:-5px 0px 0px 0px;_margin:-40px 0px 0px 0px;width:400px;'><p style='text-align:left;background:#D9ED8A;margin:0px 0px 0px 0px;font-family:Arial, Helvetica, Sans-serif;'><b>Add New Presentation</b></p><div style=' padding: 8px 0px 0px 10px;text-align:left;float:left;font-size:12px;border:0px solid;font-family:Arial, Helvetica, Sans-serif;'>Select presentation type to add:</div><div id='presentation1' name='presentation1' style='text-align:left;float:left;width:200px;padding:8px 0px 0px 10px;'><select onchange='typeMessage("+i+");typeHead("+i+")' name='present"+i+"' id='present"+i+"'/></select></div><br /><br /><div onclick=viewDescLayer(event,'present"+i+"','presentDescLayer') style='margin:0px 0px 10px 10px;cursor: pointer;color:green;font-size:12px;border:0px solid;width:132px'>What do we expect from<p style='width:160px;margin:-14px 0px 0px 132px;color:green' id='head"+i+"' ></p></div>";
			
			//document.getElementById('present');
			presentation.innerHTML +="</div>";
		presentation.innerHTML +="</div>";
		presentation.innerHTML +="<div class='clear'></div>";
		//typeVal=document.getElementById("present"+i).selectedIndex;

		//alert(typeVal);
		presentation.innerHTML +="<div id='propos"+i+"' style='margin: -2px 0px 0px 0px;_margin: -15px 0px 0px 0px;text-align:left;float:left;font-size:9pt;border:0px solid;font-family:Arial, Helvetica, Sans-serif;'></div>";
		
		//presentation.innerHTML +="<div style='padding: 0px 0px 0px 0px;width:400px;float:left;border:1px solid;'>";
		presentation.innerHTML +="<div class='clear'></div>";
			presentation.innerHTML +="<div style='margin: 5px 0px 0px 0px;_margin: 0px 0px 0px 0px;text-align:left;float:left;font-size:10pt;border:0px solid;'><p>Enter the Title of Your Proposal:</p></div>";
			presentation.innerHTML +="<div class='caltitle'><input type='text' name='proposalTitle"+i+"' id='proposalTitle"+i+"' size='32' value=''></div>";
			presentation.innerHTML +="<div class='clear'></div>";
		//presentation.innerHTML +="</div>";
		//presentation.innerHTML +="<div style='padding: 10px 0px 0px 0px;width:0px;float:left;border:0px solid;clear:both'>";
			presentation.innerHTML +="<div style='margin: -5px 0px 0px 0px;_margin: -10px 0px 0px 0px;text-align:left;float:left;font-size:10pt;border:0px solid;'><p>Enter the Short Abstract:</p></div><br />";
			presentation.innerHTML +="<div class='calabstract'><textarea type='text' name='abstract"+i+"' id='abstract"+i+"' cols='24' rows='3' ></textarea></div><br />";
			presentation.innerHTML +="<div class='clear'></div>";
			presentation.innerHTML +="<p style='margin: -5px 0px 0px 0px;_margin: -10px 0px 0px 0px;font-size:8pt;font-weight:none'>* Abstract only please. Do not include the title or presenters. Abstract must be no longer than 2000 characters. You may copy and paste or type in your short abstract text.</p>";
		presentation.innerHTML +="</div>";
	presentation.innerHTML +="</div>";
	presentation.innerHTML +="<div class='clear'></div>";
	
	presentation.innerHTML +="<div id='presentDescLayer'  style='background-color:#ffffff;width:350px;_height:auto;display:none;position: absolute;z-index:400;border:1px solid #CFF61A;'></div>";
	typeMessage(i);	
	typeHead(i);	
	
	
}

createPresentType();

}



function loadcategory(catid)
{
	document.getElementById('nomination'+catid).style.display="";
	document.getElementById('btnplusimage'+catid).style.display="none";
	document.getElementById('btnminusimage'+catid).style.display="";
	document.getElementById('loading'+catid).style.display="none";	
}

function notloadcategory(catid)
	{
		document.getElementById('nomination'+catid).style.display="none";
		document.getElementById('btnminusimage'+catid).style.display="none";
		document.getElementById('btnplusimage'+catid).style.display="";
		
	}



//-----This function is used to create presentation type layer
function createPresentType()
{
	var createType;	
	//params ="action=createpresentationtype";
	
		createType = "callforpaper.html?action=createpresentationtype";
		http = getHTTPObject(); // We create the HTTP Object
		http.open("GET", createType, true);
		http.onreadystatechange = function (){HttpResponse()};
		http.send(null);
}
function HttpResponse()
{
	if (http.readyState == 4)
	{  
		// only if "OK"
        if (http.status == 200)
		{
			response  = http.responseText;	
			var sr=eval("("+http.responseText+")");
		//	result+="<div><select onchange='' name='proposaltype' id='proposaltype'/>";
					
				for(i = 0; i < sr['presentTypeArray'].length; i++)
				{	
					//result ="<option value="+sr.presentTypeArray[i].key+" />"+sr.presentTypeArray[i].value+"</option>";
					key = sr.presentTypeArray[i].key;
					value = sr.presentTypeArray[i].value;	
					
					//var present=present+i;
					if(document.getElementById("present1"))
					document.forms['pageform'].present1.options[i] = new Option(value ,key);
					if(document.getElementById("present2"))
					document.forms['pageform'].present2.options[i] = new Option(value ,key);
					if(document.getElementById("present3"))
					document.forms['pageform'].present3.options[i] = new Option(value ,key);
					if(document.getElementById("present4"))
					document.forms['pageform'].present4.options[i] = new Option(value ,key);
					if(document.getElementById("present5"))
					document.forms['pageform'].present5.options[i] = new Option(value ,key);
					//document.forms['pageform'].present6.options[i] = new Option(value ,key);
					//document.getElementById("present1").options[i] = new option(value ,key);
					
				}
			
			
 		}
	}

}

//-------This function is used to display the layer using json method------
function viewDescLayer(e,present,divId)
{
	preType = document.getElementById(present).options[document.getElementById(present).selectedIndex].text;
	
	typeIndex=document.getElementById(present).selectedIndex+1;
	var posx = 0;
	var posy = 0;
	if (!e) var e = window.event;
	//alert(e);
	if (e.pageX || e.pageY)
	{		
		//posx = e.pageX+10;
		posy = e.pageY-180;
		document.getElementById(divId).style.top = posy+192+"px";
		//posy = e.pageY-180;
		//document.getElementById(divId).style.top = 1310;
		document.getElementById(divId).style.left=50 ;
	}
	else if (e.clientX || e.clientY)//IE
	{

		posy = e.clientY + document.body.scrollTop;
		document.getElementById(divId).style.top = posy+10+"px";
	
		
		document.getElementById(divId).style.left= 55;
		//posx = e.clientX + document.body.scrollLeft;
		//posy = e.clientY + document.body.scrollTop;
		//document.getElementById(divId).style.top = 90+"px";
		//document.getElementById(divId).style.right= 40;
	}
		var createLayer;		
	
		createLayer = "callforpaper.html?action=createpresentdesclayer&typeIndex="+typeIndex+"";
		http = getHTTPObject(); // We create the HTTP Object
		http.open("GET", createLayer, true);
		http.onreadystatechange = function (){HttpResponse1(divId,preType)};
		http.send(null);
		
}

function HttpResponse1(divId,preType)
{
	
	if (http.readyState == 4)
	{  
		// only if "OK"
        if (http.status == 200)
		{
			
			 // http.responseText;
			var sr=eval("("+http.responseText+")");
						
			if((sr['presentDescArray'].length)>0)
			{
				document.getElementById(divId).style.display="";
				
				//for(i = 0; i < sr['presentDescArray'].length; i++) {			
				key = sr.presentDescArray[0].key;	
				decr = sr.presentDescArray[0].value;	
				result="<div  style='width:100%;font-size:11;font-family:Arial, Helvetica, Sans-serif'";	
				result+="<div  id='handle' width='100%' style=background:#D9ED8A;color:black;height:20px;_height:25px' ><p style='float:left;font-size:10pt;margin:0px 0px 0px 5px;font-weight:bold'>"+preType+"</p><a href='javascript:void(0);' onclick='closeLayerDiv(\"presentDescLayer\")'><b style='color:black;font-size:10pt;float:right;margin:0px 3px 0px 0px;cursor:pointer;'>Close[X]</b></a></div>";	
		
				result+="<div style='display:block;background:#ffff;border:3px solid #fff;border-width:0 3px;margin:10px 5px 10px 5px;text-align:justify;font-size:10pt;font-family:Arial, Helvetica, Sans-serif'>"+decr+"</div>";
				
				result+="</div>";
		
			}
			document.getElementById(divId).innerHTML = result;
			divDrag(divId);
  		} 
	}
}

//---------This function is used to display the message ie time duration for each presentation---------
function typeMessage(i)
{
	//alert(i);
	proposalIndex=document.getElementById("present"+i).selectedIndex;
	if(proposalIndex=='-1')
		proposalIndex=0;
	var messageArray = new Array();
	
	messageArray[0]="The proposal type you have selected is “Keynotes” of 30 minute duration.";
	messageArray[1]="The proposal type you have selected is “Focused Sessions” of 15-22 minute duration.";
	messageArray[2]="The proposal type you have selected is “Power Panels” of 90 minute duration.";
	messageArray[3]="The proposal type you have selected is “Case Studies” of 45 minute duration.";
	messageArray[4]="The proposal type you have selected is “Birds of Feather (BoF)” of 90-120 minute duration.";
	messageArray[5]="The proposal type you have selected is “Hands-on-Workshops” of 180 minute duration.";

	document.getElementById("propos"+i).innerHTML = messageArray[proposalIndex];


}

//---------This function is used to display the title of presentation time duration for each presentation---------
function typeHead(i)
{
	//alert(i);
	proIndex=document.getElementById("present"+i).selectedIndex;
	if(proIndex=='-1')
		proIndex=0;
	var headArray = new Array();
	
	headArray[0]="Keynotes";
	headArray[1]="Focused Sessions";
	headArray[2]="Power Panels";
	headArray[3]="Case Studies";
	headArray[4]="Birds of Feather (BoF)";
	headArray[5]="Hands-on-Workshops";

	document.getElementById("head"+i).innerHTML = headArray[proIndex];
	


}

//-----------This function is used to drag the Description layer----------
function divDrag(divId){
	var theHandle = document.getElementById("handle");
	var theRoot = document.getElementById(divId);
	Drag.init(theHandle, theRoot);
}

//------------This function is used to close the Description Layer.------------
function closeLayerDiv(divId){
	document.getElementById(divId).style.display="none";
	document.getElementById(divId).style.display="none";
	
}

/**
* This fuction is used to save or update Speaker
*
* @access   public
* @param    null
*           
* @return   null
*/
function saveSpeaker()
{
	
	if(callforValidation())
	{
		
		   document.getElementById("action").value="SaveSpeaker";
           document.getElementById("pageform").submit();
	}
}

/**
* This fuction is used to validate callfor details
*
* @access   public
* @param    null
*           
* @return   true / false
*/

function callforValidation()
{
	if(document.getElementById("firstname").value.match(/^ *$/))
	
	{
		alert("Please enter first name");
		document.getElementById("firstname").focus();
		return;
	}

	else if(document.getElementById("lastname").value.match(/^ *$/))
	
	{
		alert("Please enter last name.");
		document.getElementById("lastname").focus();
		return;
	}
	else if(document.getElementById("company").value.match(/^ *$/))
	
	{
		alert("Please enter your company.");
		document.getElementById("company").focus();
		return;
	}
	
	else if(document.getElementById("address1").value.match(/^ *$/))
	
	{
		alert("Please enter your current address.");
		document.getElementById("address1").focus();
		return;
	}
	else if(document.getElementById("city").value.match(/^ *$/))
	
	{
		alert("Please enter your city.");
		document.getElementById("city").focus();
		return;
	}
	else if(document.getElementById("state").value.match(/^ *$/))
	
	{
		alert("Please enter your state.");
		document.getElementById("state").focus();
		return;
	}
	else if(document.getElementById("pincode").value.match(/^ *$/))
	
	{
		alert("Please enter your zip/postal code.");
		document.getElementById("pincode").focus();
		return;
	}
	else if(document.getElementById("country").value=='new')
	
	{
		alert("Please select your country.");
		document.getElementById("country").focus();
		return;
	}
	else if(document.getElementById("phone").value.match(/^ *$/))
	
	{
		alert("Please enter your phone number.");
		document.getElementById("phone").focus();
		return;
	}
	else if(document.getElementById("handphone").value.match(/^ *$/))
	
	{
		alert("Please enter your hand phone number.");
		document.getElementById("handphone").focus();
		return;
	}
	else if(checkEmail(document.getElementById("email").value)!=true)
	{
		//alert("Please Enter valid Email.!!!!");
		document.getElementById("email").focus();
		return;
	}	
	else if(document.getElementById("speakerImage").value=='')
	
	{
		alert("Please upload your image.");
		document.getElementById("speakerImage").focus();
		return;
	}
	else if(document.getElementById("biography").value.match(/^ *$/))
	
	{
		alert("Please enter your biography.");
		document.getElementById("biography").focus();
		return;
	}

	else if(document.getElementById("agree").checked==false)
	
	{
		alert("Agree the above guidelines and the selection, notification, and responsibilities.");
		document.getElementById("agree").focus();
		return;
	}
	
	return true;
}


/**
* This fuction is used to save or update Expo 
*
* @access   public
* @param    null
*           
* @return   null
*/
function saveSponsorsPartners()
{
	if(expoValidation())
	{
	   document.getElementById("action").value="SaveSponsorsPartners";
       document.getElementById("pageform").submit();
	}
}

/**
* This fuction is used to save or update Expo 
*
* @access   public
* @param    null
*           
* @return   null
*/
function saveExpo()
{
	if(expoValidation())
	{
		
		   document.getElementById("action").value="SaveExpo";
           document.getElementById("pageform").submit();
	}
}


/**
* This fuction is used to validate expo details
*
* @access   public
* @param    null
*           
* @return   true / false
*/

function expoValidation()
{
	if(document.getElementById("firstname").value.match(/^ *$/))
	
	{
		alert("Please enter first name");
		document.getElementById("firstname").focus();
		return;
	}

	else if(document.getElementById("lastname").value.match(/^ *$/))
	
	{
		alert("Please enter last name.");
		document.getElementById("lastname").focus();
		return;
	}
	else if(document.getElementById("company").value.match(/^ *$/))
	
	{
		alert("Please enter your company.");
		document.getElementById("company").focus();
		return;
	}
	else if(checkEmail(document.getElementById("email").value)!=true)
	{
		//alert("Please Enter valid Email.!!!!");
		document.getElementById("email").focus();
		return;
	}	
	else if(document.getElementById("address1").value.match(/^ *$/))
	
	{
		alert("Please enter your current address.");
		document.getElementById("address1").focus();
		return;
	}
	else if(document.getElementById("city").value.match(/^ *$/))
	
	{
		alert("Please enter your city.");
		document.getElementById("city").focus();
		return;
	}
	else if(document.getElementById("state").value.match(/^ *$/))
	
	{
		alert("Please enter your state.");
		document.getElementById("state").focus();
		return;
	}
	else if(document.getElementById("pincode").value.match(/^ *$/))
	
	{
		alert("Please enter your zip/postal code.");
		document.getElementById("pincode").focus();
		return;
	}
	else if(document.getElementById("country").value=='new')
	
	{
		alert("Please select your country.");
		document.getElementById("country").focus();
		return;
	}
	else if(document.getElementById("phone").value.match(/^ *$/))
	
	{
		alert("Please enter your phone number.");
		document.getElementById("phone").focus();
		return;
	}
	else if(document.getElementById("handphone").value.match(/^ *$/))
	
	{
		alert("Please enter your hand phone number.");
		document.getElementById("handphone").focus();
		return;
	}
	
	else if(document.getElementById("comment").value.match(/^ *$/))
	
	{
		alert("Please enter your comments.");
		document.getElementById("comment").focus();
		return;
	}

	return true;
}
/**
* This fuction is used to save or update Sponsor 
*
* @access   public
* @param    null
*           
* @return   null
*/
function saveSponsor()
{
	if(sponsorValidation())
	{
		
		   document.getElementById("action").value="SaveSponsor";
           document.getElementById("pageform").submit();
	}
}

/**
* This fuction is used to validate sponsor
* @access   public
* @param    null
*           
* @return   true / false
*/

function sponsorValidation()
{
	if(document.getElementById("firstname").value.match(/^ *$/))
	
	{
		alert("Please enter first name");
		document.getElementById("firstname").focus();
		return;
	}

	else if(document.getElementById("lastname").value.match(/^ *$/))
	
	{
		alert("Please enter last name.");
		document.getElementById("lastname").focus();
		return;
	}
	else if(document.getElementById("company").value.match(/^ *$/))
	
	{
		alert("Please enter your company.");
		document.getElementById("company").focus();
		return;
	}
	else if(checkEmail(document.getElementById("email").value)!=true)
	{
		//alert("Please Enter valid Email.!!!!");
		document.getElementById("email").focus();
		return;
	}	
	else if(document.getElementById("address1").value.match(/^ *$/))
	
	{
		alert("Please enter your current address.");
		document.getElementById("address1").focus();
		return;
	}
	else if(document.getElementById("city").value.match(/^ *$/))
	
	{
		alert("Please enter your city.");
		document.getElementById("city").focus();
		return;
	}
	else if(document.getElementById("state").value.match(/^ *$/))
	
	{
		alert("Please enter your state.");
		document.getElementById("state").focus();
		return;
	}
	else if(document.getElementById("pincode").value.match(/^ *$/))
	
	{
		alert("Please enter your zip/postal code.");
		document.getElementById("pincode").focus();
		return;
	}
	else if(document.getElementById("country").value=='new')
	
	{
		alert("Please select your country.");
		document.getElementById("country").focus();
		return;
	}
	else if(document.getElementById("phone").value.match(/^ *$/))
	
	{
		alert("Please enter your phone number.");
		document.getElementById("phone").focus();
		return;
	}
	else if(document.getElementById("handphone").value.match(/^ *$/))
	
	{
		alert("Please enter your hand phone number.");
		document.getElementById("handphone").focus();
		return;
	}
	else if(document.getElementById("investment").value.match(/^ *$/))
	
	{
		alert("Please enter your investment.");
		document.getElementById("investment").focus();
		return;
	}
	else if(document.getElementById("investment").value.match(/^ *$/))
	
	{
		alert("Please enter your investment.");
		document.getElementById("investment").focus();
		return;
	}
	
	return true;
}
/**
* This fuction is used to save  Contact 
*
* @access   public
* @param    null
*           
* @return   null
*/
function saveContact()
{
	if(contactValidation())
	{
		
		   document.getElementById("action").value="SaveContact";
           document.getElementById("pageform").submit();
	}
}

/**
* This fuction is used to validate GES details
*
* @access   public
* @param    null
*           
* @return   true / false
*/

function contactValidation()
{
	if(document.getElementById("moreinfo").value=='new')
	
	{
		alert("Please select contact title.");
		document.getElementById("moreinfo").focus();
		return;
	}

	else if(document.getElementById("firstname").value.match(/^ *$/))
	
	{
		alert("Please enter first name");
		document.getElementById("firstname").focus();
		return;
	}
	
	else if(document.getElementById("lastname").value.match(/^ *$/))
	
	{
		alert("Please enter last name.");
		document.getElementById("lastname").focus();
		return;
	}
	else if(checkEmail(document.getElementById("email").value)!=true)
	{
		//alert("Please Enter valid Email.!!!!");
		document.getElementById("email").focus();
		return;
	}	
	
	return true;
}


/**
* This fuction is used to save  Contact 
*
* @access   public
* @param    null
*           
* @return   null
*/
function saveMailingList()
{
	if(mailingListValidation())
	{
		
		   document.getElementById("action").value="SaveMailingList";
           document.getElementById("pageform").submit();
	}
}

/**
* This fuction is used to validate GES details
*
* @access   public
* @param    null
*           
* @return   true / false
*/

function mailingListValidation()
{
	if(document.getElementById("firstname").value.match(/^ *$/))	
	{
		alert("Please enter first name");
		document.getElementById("firstname").focus();
		return;
	}	
	else if(document.getElementById("lastname").value.match(/^ *$/))	
	{
		alert("Please enter last name.");
		document.getElementById("lastname").focus();
		return;
	}
	else if(document.getElementById("designation").value.match(/^ *$/))	
	{
		alert("Please enter your designation.");
		document.getElementById("designation").focus();
		return;
	}
	else if(document.getElementById("company").value.match(/^ *$/))	
	{
		alert("Please enter your company name.");
		document.getElementById("company").focus();
		return;
	}
	else if(document.getElementById("city").value.match(/^ *$/))	
	{
		alert("Please enter your city.");
		document.getElementById("city").focus();
		return;
	}
	else if(document.getElementById("country").value=='new')
	
	{
		alert("Please select your country.");
		document.getElementById("country").focus();
		return;
	}
	else if((document.getElementById("phone2").value==null)||(document.getElementById("phone2").value==""))	
	{
		alert("Please enter your area code.");
		document.getElementById("phone2").focus();
		return false;
	}
	else if (checkInternationalPhone2(document.getElementById("phone2").value)==false)
	{
		alert("Please enter a valid area code");		
		document.getElementById("phone2").value=""
		document.getElementById("phone2").focus()
		return false;
	}

	else if((document.getElementById("phone3").value==null)||(document.getElementById("phone3").value==""))	
	{
		alert("Please enter your phone number.");		
		document.getElementById("phone3").focus();
		return false;
	}
	else if (checkInternationalPhone3(document.getElementById("phone3").value)==false)
	{
		alert("Please enter a valid phone number");	
		document.getElementById("phone3").value=""
		document.getElementById("phone3").focus()
		return false;
	}
	else if(document.getElementById("handphone").value.match(/^ *$/))	
	{
		alert("Please enter your handphone.");
		document.getElementById("handphone").focus();
		return;
	}
	else if(checkEmail(document.getElementById("email").value)!=true)
	{
		//alert("Please Enter valid Email.!!!!");
		document.getElementById("email").focus();
		return;
	}	
	else if(document.getElementById("area").value=='')	
	{
		alert("Please select your Interest.");
		document.getElementById("area").focus();
		return;
	}
	
	return true;
}

/**
* This fuction is used to save or update Nominee details 
*
* @access   public
* @param    null
*           
* @return   null
*/
function saveNominee()
{
	if(validation1())
	{		
		   document.getElementById("action").value="SaveNominee";
           document.getElementById("pageform").submit();
	}
}

/**
* This fuction is used to validate GES details
*
* @access   public
* @param    null
*           
* @return   true / false
*/

function validation1()
{
	if(document.getElementById("fullname").value.match(/^ *$/))
	
	{
		alert("Please enter full name");
		document.getElementById("fullname").focus();
		return;
	}

	else if(checkEmail(document.getElementById("email").value)!=true)
	{
		//alert("Please Enter valid Email.!!!!");
		document.getElementById("email").focus();
		return;
	}	
	
	return true;
}

/**
* This fuction is used to save fieldtrip details 
*
* @access   public
* @param    null
*           
* @return   null
*/
function bookSeat()
{
	if(validation())
	{
		document.getElementById("action").value="SaveFieldTrip";
        document.getElementById("pageform").submit();
	}
}


/**
* This fuction is used to validate GES details
*
* @access   public
* @param    null
*           
* @return   true / false
*/

function validation()
{
	if(document.getElementById("firstname").value.match(/^ *$/))
	
	{
		alert("Please enter first name");
		document.getElementById("firstname").focus();
		return;
	}

	else if(document.getElementById("lastname").value.match(/^ *$/))
	
	{
		alert("Please enter last name.");
		document.getElementById("lastname").focus();
		return;
	}
	else if(checkEmail(document.getElementById("email").value)!=true)
	{
		//alert("Please Enter valid Email.!!!!");
		document.getElementById("email").focus();
		return;
	}	
	
	return true;
}

function checkEmail(str) 
{
	if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(str))
	{
		return (true)
	}
	alert("Invalid E-mail Address! Please Enter valid E-mail Address.");
	return (false)
}

function viewCalendar()
{
	document.getElementById('mcalendar').style.display="";
}

function notcalendar()
{
	document.getElementById('mcalendar').style.display="none";
}

/**
* This fuction is used to refresh pages 
*
* @access   public
* @param    null
*           
* @return   null
*/
function refreshPage()
{
	
	document.getElementById("pageform").submit();
	
}

function refreshVerificationCode()
{
   var ran=Math.floor(Math.random()*10);
   var path=document.getElementById("imgsrc").src;
   document.getElementById("imgsrc").src=path+"?rand="+ran;
}

/**
* This fuction is used to save Registration details
*
* @access   public
* @param    null
*           
* @return   null
*/
function saveRegister()
{
	
			if(validationRegister())
	{		
			 if(document.getElementById("agree").checked==false)
	
			{
				agreeMsg.innerHTML ="";
				agreeMsg.innerHTML +="*Agree the Terms and Conditions.";
				//alert("Agree the Terms and Conditions.");
				document.getElementById("agree").focus();
				return;

			}
			//alert("came");
		    document.getElementById("action").value="SaveRegister";
            document.getElementById("pageform").submit();
	}
		 
			
}


/**
* This fuction is used to validate sponsor
* @access   public
* @param    null
*           
* @return   true / false
*/

function validationRegister()
{
	if(document.getElementById("firstname").value.match(/^ *$/))
	
	{
		document.getElementById("firstNameMsg").style.display="";
		firstNameMsg.innerHTML ="";
		firstNameMsg.innerHTML +="*Please enter your first name.";
		//alert("Please enter your phone number.");
		document.getElementById("firstname").focus();
		return false;
	}
	
	
	else if(document.getElementById("lastname").value.match(/^ *$/))
	
	{
		document.getElementById("lastNameMsg").style.display="";
		lastNameMsg.innerHTML ="";
		lastNameMsg.innerHTML +="*Please enter your last name.";
		//alert("Please enter your phone number.");
		document.getElementById("lastname").focus();
		return false;
	}
	
	else if(document.getElementById("designation").value.match(/^ *$/))
	
	{
		document.getElementById("desigMsg").style.display="";
		desigMsg.innerHTML ="";
		desigMsg.innerHTML +="*Please enter your designation.";
		//alert("Please enter your phone number.");
		document.getElementById("designation").focus();
		return false;
		
	}
	
	else if(document.getElementById("company").value.match(/^ *$/))
	
	{
		document.getElementById("companyMsg").style.display="";
		document.getElementById("company").focus();
		return;
	}
	
	else if(document.getElementById("address1").value.match(/^ *$/))
	
	{
		document.getElementById("AddressMsg").style.display="";
		document.getElementById("address1").focus();
		return;
	}
	else if(document.getElementById("city").value.match(/^ *$/))
	
	{
		document.getElementById("cityMsg").style.display="";
		document.getElementById("city").focus();
		return;
	}
	/*else if(document.getElementById("state").value.match(/^ *$/))
	
	{
		document.getElementById("stateMsg").style.display="";
		document.getElementById("state").focus();
		return;
	}
	else if((document.getElementById("pincode").value==null)||(document.getElementById("pincode").value==""))
	
	{
		document.getElementById("zipMsg").style.display="";
		document.getElementById("pincode").focus();
		return false;
	}
	else if(alphanumeric(document.getElementById("pincode").value)==false)
	
	{
		document.getElementById("zipMsg").style.display="";
		document.getElementById("pincode").value=""
		document.getElementById("pincode").focus();
		return false;
	}*/
		
	else if(document.getElementById("country").value=='new')
	
	{
		document.getElementById("countryMsg").style.display="";
		document.getElementById("country").focus();
		return;
	}
	else if((document.getElementById("phone2").value==null)||(document.getElementById("phone2").value==""))
	
	{
		document.getElementById("phoneMsg").style.display="";
		phoneMsg.innerHTML ="";
		phoneMsg.innerHTML +="*Please enter your area code.";
		//alert("Please enter your phone number.");
		document.getElementById("phone2").focus();
		return false;
	}
	else if (checkInternationalPhone2(document.getElementById("phone2").value)==false){

		document.getElementById("phoneMsg").style.display="";
		phoneMsg.innerHTML ="";
		phoneMsg.innerHTML +="*Please enter a valid area code";
		//alert("Please enter a valid phone number")
		document.getElementById("phone2").value=""
		document.getElementById("phone2").focus()
		return false;
	}

	else if((document.getElementById("phone3").value==null)||(document.getElementById("phone3").value==""))
	
	{
		document.getElementById("phoneMsg").style.display="";
		phoneMsg.innerHTML ="";
		phoneMsg.innerHTML +="*Please enter your phone number.";
		//alert("Please enter your phone number.");
		document.getElementById("phone3").focus();
		return false;
	}
	else if (checkInternationalPhone3(document.getElementById("phone3").value)==false){

		document.getElementById("phoneMsg").style.display="";
		phoneMsg.innerHTML ="";
		phoneMsg.innerHTML +="*Please enter a valid phone number";
		//alert("Please enter a valid phone number")
		document.getElementById("phone3").value=""
		document.getElementById("phone3").focus()
		return false;
	}

	/*else if((document.getElementById("fax2").value==null)||(document.getElementById("fax2").value==""))
	
	{
		document.getElementById("faxMsg").style.display="";
		faxMsg.innerHTML ="";
		faxMsg.innerHTML +="*Please enter your area code.";
		//alert("Please enter your phone number.");
		document.getElementById("fax2").focus();
		return false;
	}*/
	else if (checkInternationalPhone2(document.getElementById("fax2").value)==false){

		document.getElementById("faxMsg").style.display="";
		faxMsg.innerHTML ="";
		faxMsg.innerHTML +="*Please enter a valid area code";
		//alert("Please enter a valid phone number")
		document.getElementById("fax2").value=""
		document.getElementById("fax2").focus()
		return false;
	}

	/*else if((document.getElementById("fax3").value==null)||(document.getElementById("fax3").value==""))
	
	{
		document.getElementById("faxMsg").style.display="";
		faxMsg.innerHTML ="";
		faxMsg.innerHTML +="*Please enter your phone number.";
		//alert("Please enter your phone number.");
		document.getElementById("fax3").focus();
		return false;
	}*/
	if(document.getElementById("fax2").value!="")
	{
		if (checkInternationalPhone3(document.getElementById("fax3").value)==false){

			document.getElementById("faxMsg").style.display="";
			faxMsg.innerHTML ="";
			faxMsg.innerHTML +="*Please enter a valid fax number";
			//alert("Please enter a valid phone number")
			document.getElementById("fax3").value=""
			document.getElementById("fax3").focus()
			return false;
		}
	}

	
	
	
	if(checkEmail(document.getElementById("email").value)!=true)
	{
		document.getElementById("emailMsg").style.display="";
		emailMsg.innerHTML ="";
		emailMsg.innerHTML +="*Invalid E-mail Address! Please Enter valid E-mail Address.";
		document.getElementById("email").value=""
		document.getElementById("email").focus();
		
		return;
	}	

	if(!document.getElementById("dayPass1").checked && !document.getElementById("dayPass2").checked && !document.getElementById("summitPass_gold").checked && !document.getElementById("dayPass3").checked)
	{
		//alert("asdfasdf");
		document.getElementById("summitPassMsg").style.display="";
		summitPassMsg.innerHTML ="";
		summitPassMsg.innerHTML +="PLEASE SELECT THE CONFERENCE DAY(S) YOU WANT TO ATTEND FROM THE OPTIONS BELOW";
		//alert("Please enter your phone number.");
		window.location.hash="conference";
		return false;
	}

	if(document.getElementById("bulkBooking").checked)
	{
		if (document.getElementById("coordinatorName").value.match(/^ *$/)){

			document.getElementById("crdNameMsg").style.display="";
			crdNameMsg.innerHTML ="";
			crdNameMsg.innerHTML +="*Please enter the coordinator’s name";
			//alert("Please enter a valid phone number")
			document.getElementById("coordinatorName").value="";
			document.getElementById("coordinatorName").focus();
			return false;
		}
		else if (checkEmail(document.getElementById("coordinatorEmail").value)!=true){
			document.getElementById("crdEmailMsg").style.display="";
			crdEmailMsg.innerHTML ="";
			crdEmailMsg.innerHTML +="*Invalid E-mail Address! Please Enter valid E-mail Address.";
			//alert("Please enter a valid phone number")
			document.getElementById("coordinatorEmail").value="";
			document.getElementById("coordinatorEmail").focus();
			return false;
		}
	}
	
	
	/*else if(document.getElementById("payMethod").checked)
	
	{	
		emailMsg.innerHTML ="";
		if(document.getElementById("checkNo").value.match(/^ *$/))
		{

			alert("Please enter the cheque/DD number.");
			document.getElementById("checkNo").focus();
			return;
		}
		else if(document.getElementById("issuebank").value.match(/^ *$/))
	
		{
			alert("Please enter the issuing bank.");
			document.getElementById("issuebank").focus();
			return;
		}
		else if(document.getElementById("payable").value.match(/^ *$/))
	
		{
			alert("Please enter the payable details.");
			document.getElementById("payable").focus();
			return;
		}
		else if(document.getElementById("chequeAmt").value.match(/^ *$/))
	
		{
			alert("Please enter the cheque amount.");
			document.getElementById("chequeAmt").focus();
			return;
		}
	}*/
	
	
	return true;
}

function IsNumeric(textboxId)
{
	//alert("gfhfhf");
   var ValidChars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_.";
   var IsNumber=true;
   var Char;
   var test='';
	   sText=document.getElementById(textboxId).value;
	   //test = document.getElementById("pcode").value;
 
   for (i = 0;i < sText.length && IsNumber == true; i++) 
      { 
      Char = sText.charAt(i); 
      if (ValidChars.indexOf(Char) == -1) 
         {
         IsNumber = false;
         }
		 else{
			 
			 test =test+sText.charAt(i);
		 }
      }
	  document.getElementById(textboxId).value=test;
	
     }

	 //************** PHONE NIMBER VALIDATION FUNCTION STARTS********************

function isInteger(s)
{   var i;
    for (i = 0; i < s.length; i++)
    {   
        // Check that current character is number.
        var c = s.charAt(i);
        if (((c < "0") || (c > "9"))) return false;
    }
    // All characters are numbers.
    return true;
}

function stripCharsInBag(s, bag)
{   var i;
    var returnString = "";
    // Search through string's characters one by one.
    // If character is not in bag, append to returnString.
    for (i = 0; i < s.length; i++)
    {   
        // Check that current character isn't whitespace.
        var c = s.charAt(i);
        if (bag.indexOf(c) == -1) returnString += c;
    }
    return returnString;
}

function checkInternationalPhone2(strPhone){

	// Declaring required variables
	var digits = "0123456789";
	// non-digit characters which are allowed in phone numbers
	var phoneNumberDelimiters = "";
	// characters which are allowed in international phone numbers
	// (a leading + is OK)
	var validWorldPhoneChars = phoneNumberDelimiters + "";
	// Minimum no of digits in an international phone no.
	var minDigitsInIPhoneNumber = 5;

	s=stripCharsInBag(strPhone,validWorldPhoneChars);
	return (isInteger(s) && s.length <= minDigitsInIPhoneNumber);
}

function checkInternationalPhone3(strPhone){
	// Declaring required variables
	var digits = "0123456789";
	// non-digit characters which are allowed in phone numbers
	var phoneNumberDelimiters = "";
	// characters which are allowed in international phone numbers
	// (a leading + is OK)
	var validWorldPhoneChars = phoneNumberDelimiters + "";
	// Minimum no of digits in an international phone no.
	var minDigitsInIPhoneNumber = 7;

	s=stripCharsInBag(strPhone,validWorldPhoneChars);
	return (isInteger(s) && s.length >= minDigitsInIPhoneNumber);
}

//************** PHONE NIMBER VALIDATION FUNCTION END********************


function showCordinator(){

	if(document.getElementById("bulkBooking").checked){

		document.getElementById("cordinatorDiv").style.display='';
		//document.getElementById("paymentCalculationDiv").style.display='none';
	}
	else{
		document.getElementById("cordinatorDiv").style.display='none';
		//document.getElementById("paymentCalculationDiv").style.display='';
		
	}
}

function showCoordinatorMsg(){
	
	
	document.getElementById("coordinatorMessage").innerHTML="<div  style='margin:5px 5px 5px 5px'><b>  Your manager/training coordinator with whom we can liase with for your registration payment.</b></div>";

	document.getElementById("coordinatorMessage").style.display='';
	//divDrag("coordinatorMessage");
}

function calculateAmount(){
	
	document.getElementById('displayAmount').innerHTML='';
	if(document.getElementById("country").value=='101')
		document.getElementById('displayAmount').innerHTML +="<div style='margin:5px 0px;font-size:9pt;color:black'><b>Total</b>: ( INR <input type='text' name='netAmt' id='netAmt' style='border:none;width:35px' readonly> ) + 12.36% Service Tax =&nbsp;<b>INR&nbsp;</b><input type='text' name='totalAmt' id='totalAmt' style='border:none;color:#99127B;font-weight:bold' readonly></div>";
	else
		document.getElementById('displayAmount').innerHTML +="<div style='margin:5px 0px;font-size:9pt;color:black'><b>Total</b>: ( &euro <input type='text' name='netAmt' id='netAmt' style='border:none;width:35px' readonly> ) + 12.36% Service Tax =&nbsp;<b>&euro;&nbsp;</b><input type='text' name='totalAmt' id='totalAmt' style='border:none;color:#99127B;font-weight:bold' readonly></div>";
	
	var myDate = new Date;
	
	regCode=document.getElementById("regCode").value;
	if(regCode=='SEEM')
	{
		myDate.setDate(16);
		myDate.setMonth(0); // January = 0
		myDate.setFullYear(2009);
	}
	else if(regCode=='INFY')
	{
		myDate.setDate(11);
		myDate.setMonth(0); // January = 0
		myDate.setFullYear(2009);
	}
	else if(regCode=='ALTF' || regCode=='SIERRA' || regCode=='NANO' || regCode=='GTM' || regCode=='CMI' || regCode=='PEP' || regCode=='ECO' || regCode=='TIGER' || regCode=='SIO' || regCode=='ENERGETICA')
	{
		myDate.setDate(13);
		myDate.setMonth(0); // January = 0
		myDate.setFullYear(2009);
		myDate.setUTCHours(12,30,0);
	}

	var today = new Date;
	var totalAmount;
	var totalAmount1;
	if (regCode=='SEEM' || regCode=='INFY' || regCode=='ALTF' || regCode=='SIERRA' || regCode=='NANO' || regCode=='GTM' || regCode=='CMI' || regCode=='PEP' || regCode=='ECO' || regCode=='TIGER' || regCode=='SIO' || regCode=='ENERGETICA')
	{
		if (today < myDate)
		{
			if(document.getElementById("country").value=='101')
			{
				if(document.getElementById("summitPass_gold").checked)
				{
					totalAmount1=11999;
					if(document.getElementById("dayPass3").checked)
						totalAmount1 = parseInt(totalAmount1)+parseInt(3599);
					
					totalAmount =parseInt(totalAmount1)+(totalAmount1*0.1236);
					totalAmount = Math.round(totalAmount);
				}
				else
				{
					totalAmount1=0;
					if(document.getElementById("dayPass1").checked)
					{
						totalAmount1=5999;
						if(document.getElementById("dayPass3").checked)
							totalAmount1 = parseInt(totalAmount1)+parseInt(3599);					
					}
					else if(document.getElementById("dayPass2").checked)
					{
						totalAmount1=8999;
						if(document.getElementById("dayPass3").checked)
							totalAmount1 = parseInt(totalAmount1)+parseInt(3599);					
					}
					else if(document.getElementById("dayPass3").checked)
					{
						totalAmount1=3599;
						totalAmount1 = parseInt(totalAmount1);					
					}
					totalAmount =parseInt(totalAmount1)+(totalAmount1*0.1236);
					totalAmount = Math.round(totalAmount);
				}
			}
			else
			{
				if(document.getElementById("summitPass_gold").checked)
				{
					totalAmount1=400;
					if(document.getElementById("dayPass3").checked)
						totalAmount1 = parseInt(totalAmount1)+parseInt(125);
					
					totalAmount =parseInt(totalAmount1)+(totalAmount1*0.1236);
					totalAmount = Math.round(totalAmount);
				}
				else
				{
					totalAmount1=0;
					if(document.getElementById("dayPass1").checked)
					{
						totalAmount1=250;
						if(document.getElementById("dayPass3").checked)
							totalAmount1 = parseInt(totalAmount1)+parseInt(125);					
					}
					else if(document.getElementById("dayPass2").checked)
					{
						totalAmount1=350;
						if(document.getElementById("dayPass3").checked)
							totalAmount1 = parseInt(totalAmount1)+parseInt(125);					
					}
					else if(document.getElementById("dayPass3").checked)
					{
						totalAmount1=125;
						totalAmount1 = parseInt(totalAmount1);				
					}
					totalAmount =parseInt(totalAmount1)+(totalAmount1*0.1236);
					totalAmount = Math.round(totalAmount);
				}
			}
		}
		else
		{
			if(document.getElementById("country").value=='101')
			{
				if(document.getElementById("summitPass_gold").checked)
				{
					totalAmount1=12999;
					if(document.getElementById("dayPass3").checked)
						totalAmount1 = parseInt(totalAmount1)+parseInt(3999);
					
					totalAmount =parseInt(totalAmount1)+(totalAmount1*0.1236);
					totalAmount = Math.round(totalAmount);
				}
				else
				{
					totalAmount1=0;
					if(document.getElementById("dayPass1").checked)
					{
						totalAmount1=6999;
						if(document.getElementById("dayPass3").checked)
							totalAmount1 = parseInt(totalAmount1)+parseInt(3999);					
					}
					else if(document.getElementById("dayPass2").checked)
					{
						totalAmount1=9999;
						if(document.getElementById("dayPass3").checked)
							totalAmount1 = parseInt(totalAmount1)+parseInt(3999);					
					}
					else if(document.getElementById("dayPass3").checked)
					{
						totalAmount1=3999;
						totalAmount1 = parseInt(totalAmount1);					
					}
					totalAmount =parseInt(totalAmount1)+(totalAmount1*0.1236);
					totalAmount = Math.round(totalAmount);
				}
			}
			else
			{
				if(document.getElementById("summitPass_gold").checked)
				{
					totalAmount1=450;
					if(document.getElementById("dayPass3").checked)
						totalAmount1 = parseInt(totalAmount1)+parseInt(150);
					
					totalAmount =parseInt(totalAmount1)+(totalAmount1*0.1236);
					totalAmount = Math.round(totalAmount);
				}
				else
				{
					totalAmount1=0;
					if(document.getElementById("dayPass1").checked)
					{
						totalAmount1=300;
						if(document.getElementById("dayPass3").checked)
							totalAmount1 = parseInt(totalAmount1)+parseInt(150);					
					}
					else if(document.getElementById("dayPass2").checked)
					{
						totalAmount1=400;
						if(document.getElementById("dayPass3").checked)
							totalAmount1 = parseInt(totalAmount1)+parseInt(150);					
					}
					else if(document.getElementById("dayPass3").checked)
					{
						totalAmount1=150;
						totalAmount1 = parseInt(totalAmount1);				
					}
					totalAmount =parseInt(totalAmount1)+(totalAmount1*0.1236);
					totalAmount = Math.round(totalAmount);
				}
			}
		}
	}

	else
	{
		if(document.getElementById("country").value=='101')
		{
			if(document.getElementById("summitPass_gold").checked)
			{
				totalAmount1=document.getElementById("summit_gold").value;
				if(document.getElementById("dayPass3").checked)
					totalAmount1 = parseInt(totalAmount1)+parseInt(document.getElementById("summitPass_3").value);
				
				totalAmount =parseInt(totalAmount1)+(totalAmount1*0.1236);
				totalAmount = Math.round(totalAmount);
			}
			else
			{
				totalAmount1=0;
				for(var i=1;i<4;i++)
				{
					id="summitPass_"+i;
					var dayId="dayPass"+i;
					//alert(dayId);
					//alert(document.pageform.summitPass[i].value);
					if(document.getElementById(dayId).checked)
					{
						totalAmount1 =parseInt(totalAmount1)+parseInt(document.getElementById(id).value);
					}
				}
				//alert(totalAmount1);
				totalAmount =parseInt(totalAmount1)+(totalAmount1*0.1236);
				totalAmount = Math.round(totalAmount);
			}
		}
		else
		{
			if(document.getElementById("summitPass_gold").checked)
			{
				totalAmount1=document.getElementById("summit_gold1").value;
				if(document.getElementById("dayPass3").checked)
					totalAmount1 = parseInt(totalAmount1)+parseInt(document.getElementById("summitPass1_3").value);
				
				totalAmount =parseInt(totalAmount1)+(totalAmount1*0.1236);
				totalAmount = Math.round(totalAmount);
			}
			else
			{
				totalAmount1=0;
				for(var i=1;i<4;i++)
				{
					id="summitPass1_"+i;
					var dayId="dayPass"+i;
					//alert(dayId);
					//alert(document.pageform.summitPass[i].value);
					if(document.getElementById(dayId).checked)
					{
						totalAmount1 =parseInt(totalAmount1)+parseInt(document.getElementById(id).value);
					}
				}
				//alert(totalAmount1);
				totalAmount =parseInt(totalAmount1)+(totalAmount1*0.1236);
				totalAmount = Math.round(totalAmount);
			}
		}
	}
	document.getElementById("netAmt").value=totalAmount1;
	document.getElementById("totalAmt").value=totalAmount;

	
}


