
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;
}

//------------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 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);
}


/*********************************Main Navigation Script starts*******************************/

var menuids=new Array("verticalmenu") //Enter id(s) of UL menus, separated by commas
var submenuoffset=-2 //Offset of submenus from main menu. Default is -2 pixels.

function createcssmenu(){
for (var i=0; i<menuids.length; i++){
  var ultags=document.getElementById(menuids[i]).getElementsByTagName("ul")
    for (var t=0; t<ultags.length; t++){
    var spanref=document.createElement("span")
		spanref.className="arrowdiv"
		spanref.innerHTML="&nbsp;&nbsp;"
		ultags[t].parentNode.getElementsByTagName("a")[0].appendChild(spanref)
    ultags[t].parentNode.onmouseover=function(){
    this.getElementsByTagName("ul")[0].style.left=this.parentNode.offsetWidth+submenuoffset+"px"
    this.getElementsByTagName("ul")[0].style.display="block"
    }
    ultags[t].parentNode.onmouseout=function(){
    this.getElementsByTagName("ul")[0].style.display="none"
    }
    }
  }
}


if (window.addEventListener)
window.addEventListener("load", createcssmenu, false)
else if (window.attachEvent)
window.attachEvent("onload", createcssmenu)

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

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 Business Technology Summit 2008 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 at the technical edition in Bangalore is reserved for sponsors with top billing, and has a duration of 30 minutes.</p><p>The Keynote speaker slot at the executive edition in Mumbai is reserved for Client CIOs. Fortune 500 CIO's from various verticals such as BFSI, Retail, Telecom, Energy, Media, Transportation, Healthcare, and so on, with large deployments and implementations of SOA/SaaS/Virtualisation/ECM may submit their proposals using the <a href='#onlinecfp'>CfP form</a>, or contact the conference chair at <a href='mailto:info@btsummit.com?subject=Business Technology Summit 2008 Keynote Speaker Slot at Executive Edition in Mumbai'>info@btsummit.com</a> to be invited to present at the executive edition in Mumbai.</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 45 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 Business Technology Summit 2008 program agenda. There are no focused session presentation opportunities at the executive edition in Mumbai.</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 up to 4 panel participants (minimum 3). Power Panel proposals are open only for the executive edition in Mumbai to Fortune 500 Client CIO's. 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. The proposal for the power panel discussion should focus on business trends, market forces and factors, or best practices across the four featured tracks of the summit. If the proposal is accepted, the conference chair and the executive moderator will work with you to identify the other panelists. Power panels are of duration 60 minutes.</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 viewtalk()
{
	talk1.innerHTML='';
	talk1.innerHTML +="<div style='margin:5px 0px;font-size:9pt;color:black'> <p><b>What is a Lightning Talk?</b> Are you gearing up to make your first technical presentation? Perhaps you may want to start small. Lightning talks last only 15 minutes and require not more than 5 slides worth of presentation. Talks of this type could be centered around your favorite RIA Wish List, .NET Annoyances, Five Cool Java Hacks on the Client Side, and so on.</p></div>";
	document.getElementById('imgtalkminus').style.display="";	
	document.getElementById('imgtalkplus').style.display="none";
}

function notviewtalk()
{
	talk1.innerHTML='';
	document.getElementById('imgtalkplus').style.display="";	
	document.getElementById('imgtalkminus').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 project/innovation that has already created a positive impact within the four tracks envisioned for 'Business Technology Summit 2008. Case Studies should provide real-life examples of how the project/innovation has created a positive impact. This should be strictly vendor-neutral (should not be tied to a single vendor implementation or more aptly tout a specific vendor's products or solutions). Case studies that are a cross-pollination of a variety of vendor solutions, including open and free technologies, stand a better chance for selection to the program. Case Study presentation at the Bangalore edition are of 45-minute duration, and the executive edition is of 60-minute duration .</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 programmer 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 (Intermediate > advanced > Rocket Science > and so on) to the next. Hands-on workshops at the Bangalore edition can be of half-day (180 minutes) duration or full day (360 minutes); workshops at the executive edition in Mumbai is vendor-led and of 120-minute duration. The speaker should be an expert in his area of presentation and should have past experience and credentials of having presented workshops/tutorials to a profiled audience. For full day workshop proposals, speakers are encouraged to bring along a co-presenter.</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";
}

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

function loadProposal()
{	
	//presentation=document.getElementById("presentation").innerHTML;
	presentation.innerHTML='';
	index=document.getElementById("proposalno").selectedIndex;
	//alert(index);
	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' style='height:10px'></div>";
			presentation.innerHTML +="<div id='presentInner' style='border:1px solid #4173A8;height:100px;margin:-5px 0px 0px 0px;_margin:-40px 0px 0px 0px;width:400px;'><p style='text-align:left;background:#4173A8;margin:0px 0px 0px 0px;color:white;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') ><div style='margin:0px 0px 10px 10px;_margin:0px 0px 10px 5px;cursor: pointer;color:#4173A8;font-size:12px;border:0px solid;width:132px;float:left'> What do we expect from</div><div style='cursor: pointer;border:0px solid;font-size:12px;margin:0px 0px 0px 0px;color:#4173A8;float:left' id='head"+i+"'></div><div style='cursor: pointer;border:0px solid;float:left'>&nbsp;<img src='./image/question.jpg'></div></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 20px 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 style='clear:both;height:10px'></div>";
		
			presentation.innerHTML +="<div style='width:180px;margin: 5px 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><input type='text' name='proposalTitle"+i+"' id='proposalTitle"+i+"' size='32' value=''></div>";
			presentation.innerHTML +="<div class='clear'></div>";
			presentation.innerHTML +="<div style='width:180px;margin: 5px 0px 0px 0px;text-align:left;float:left;font-size:10pt;border:0px solid;'><p>Choose the Conference:</p></div>";
		presentation.innerHTML +="<div><select style='width:218px;height:70px' size='4' multiple='multiple' name='conference"+i+"' id='conference"+i+"' onchange='confTrack("+i+")'/></select></div>";
		presentation.innerHTML +="<div><input type='hidden' name='hidconference"+i+"' id='hidconference"+i+"' value=''></div>";
		presentation.innerHTML +="<div style='clear:both;margin-top:10px'></div>";
		presentation.innerHTML +="<div style='width:180px;margin: 5px 0px 0px 0px;text-align:left;float:left;font-size:10pt;border:0px solid;'>&nbsp;</div>";
		presentation.innerHTML +="<div class='conftracklist'><select style='width:218px' size='7' multiple='multiple' name='conftrack"+i+"' id='conftrack"+i+"' /></select></div>";
		presentation.innerHTML +="<div class='conflist'><input type='hidden' name='hidconftrack"+i+"' id='hidconftrack"+i+"' value=''></div>";
		presentation.innerHTML +="<div style='clear:both;margin-top:10px'></div>";
		presentation.innerHTML +="<div style='width:180px;margin: 5px 0px 0px 0px;text-align:left;float:left;font-size:10pt;border:0px solid;'><p>Level of Difficulty:</p></div>";
		presentation.innerHTML +="<div class='difficultlist'><select style='width:218px' size='5' multiple='multiple' name='difficult"+i+"' id='difficult"+i+"' /></select></div>";
		presentation.innerHTML +="<div class='conflist'><input type='hidden' name='hiddifficult"+i+"' id='hiddifficult"+i+"' value=''></div>";
		presentation.innerHTML +="<div style='clear:both;margin-top:10px'></div>";
			presentation.innerHTML +="<div style='width:180px;margin: 5px 0px 0px 0px;text-align:left;float:left;font-size:10pt;border:0px solid;'><p>Enter the Short Abstract:</p></div>";
			
			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 a minimum of 1000 characters, but 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>";
	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 #4173A8;'></div>";
	typeMessage(i);	
	typeHead(i);	
	//confTrack(i);	
	
	
}

createPresentType();
//conferenceList();
	

}


//-----This function is used to create presentation type layer
function createPresentType()
{
	//alert("came");
	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;	
			//alert("came");
			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;
					//key1 = sr.presentTypeArray[i].key1;
					value = sr.presentTypeArray[i].value;	
					//value1 = sr.presentTypeArray[i].value1;	
					
					//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);
					
				}
				for(i = 0; i < sr['conferenceArray'].length; i++)
				{	
					//result ="<option value="+sr.presentTypeArray[i].key+" />"+sr.presentTypeArray[i].value+"</option>";
					//key = sr.presentTypeArray[i].key;
					key = sr.conferenceArray[i].key;
					//value = sr.presentTypeArray[i].value;	
					value = sr.conferenceArray[i].value;	
					//alert(value1);
					
					if(document.getElementById("conference1"))
					document.forms['pageform'].conference1.options[i] = new Option(value ,key);
					if(document.getElementById("conference2"))
					document.forms['pageform'].conference2.options[i] = new Option(value ,key);
					if(document.getElementById("conference3"))
					document.forms['pageform'].conference3.options[i] = new Option(value ,key);
					if(document.getElementById("conference4"))
					document.forms['pageform'].conference4.options[i] = new Option(value ,key);
					if(document.getElementById("conference5"))
					document.forms['pageform'].conference5.options[i] = new Option(value ,key);
										
				}
				
				for(i = 0; i < sr['difficultyArray'].length; i++)
				{	
					key   = sr.difficultyArray[i].key;
					value = sr.difficultyArray[i].value;	
					
					if(document.getElementById("difficult1"))
					document.forms['pageform'].difficult1.options[i] = new Option(value ,key);
					if(document.getElementById("difficult2"))
					document.forms['pageform'].difficult2.options[i] = new Option(value ,key);
					if(document.getElementById("difficult3"))
					document.forms['pageform'].difficult3.options[i] = new Option(value ,key);
					if(document.getElementById("difficult4"))
					document.forms['pageform'].difficult4.options[i] = new Option(value ,key);
					if(document.getElementById("difficult5"))
					document.forms['pageform'].difficult5.options[i] = new Option(value ,key);
										
				}
 		}
	}

}

function confTrack(tr)
{
	//alert(document.getElementById("conference"+tr).selectedIndex);
	selected = new Array();
	var obj = document.getElementById("conference"+tr);
	//alert(obj);
		for(var i=0;i<obj.options.length;i++)
		{
			if(obj.options[i].selected)
			{
				selected.push(obj.options[i].value);
			}
		}

	//alert(selected);
	var createType;	
	//params ="action=createpresentationtype";
	
		createType = "callforpaper.html?action=getconferencetrack&key="+selected;
		http = getHTTPObject(); // We create the HTTP Object
		http.open("GET", createType, true);
		http.onreadystatechange = function (){HttpResponsetrack(tr)};
		http.send(null);
}

function HttpResponsetrack(tr)
{
	//alert(tr);
	if (http.readyState == 4)
	{  
		// only if "OK"
        if (http.status == 200)
		{
			response  = http.responseText;	
			//alert("came");
			var sr=eval("("+http.responseText+")");
			
			if(document.getElementById("conftrack"+tr))
			document.getElementById("conftrack"+tr).options.length=0;
			
				for(i = 0; i < sr['trackArray'].length; i++)
				{	
					key = sr.trackArray[i].key;
					
					value = sr.trackArray[i].value;	
					

					if(document.getElementById("conftrack"+tr))
					var name="conftrack"+tr;
					
					eval('document.pageform.'+name).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+187+"px";
		//posy = e.pageY-180;
		//document.getElementById(divId).style.top = 1310;
		document.getElementById(divId).style.left=260 ;
	}
	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;border:1px solid #4173A8;font-family:Arial, Helvetica, Sans-serif'";	
				result="<div id='handle' width='100%' style=background:#4173A8;color:white;height:20px;_height:25px;cursor:move' ><p style='float:left;color:white;font-size:10pt;margin:0px 0px 0px 5px;font-weight:bold'>"+preType+"</p><a href='javascript:void(0);' onclick='closeLayerDiv(\"presentDescLayer\")'><b style='color:white;font-size:10pt;float:right;margin:0px 3px 0px 0px;cursor:pointer;'>Close[X]</b></a></div>";	
		
				result+="<div style='display:block;background:#ffff;margin:10px 5px 10px 5px;text-align:left;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 45 minute duration.";
	messageArray[2]="The proposal type you have selected is 'Power Panels' of 60 minute duration.";
	messageArray[3]="The proposal type you have selected is 'Case Studies' the Bangalore edition are of 45-minute duration, and the executive edition is of 60-minute duration .";
	messageArray[4]="The proposal type you have selected is 'Hands-on-Workshops' the Bangalore edition can be of  half-day (180 minutes) duration or full day (360 minutes), the executive edition in Mumbai is vendor-led and of 120-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]="Hands-on-Workshops";

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

}

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 alphanumeric(alphane)
{
	var numaric = alphane;
	for(var j=0; j<numaric.length; j++)
		{
		  var alphaa = numaric.charAt(j);
		  var hh = alphaa.charCodeAt(0);
		  if((hh > 47 && hh<58) || (hh > 64 && hh<91) || (hh > 96 && hh<123))
		  {
		  }
		else	{
			 return false;
		  }
		}
	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("*Invalid E-mail Address! Please Enter valid E-mail Address.");
		document.getElementById("email").value='';
		document.getElementById("email").focus();
		return;
	}	
	
	return true;
}


/**
* This fuction is used to save or update Speaker
*
* @access   public
* @param    null
*           
* @return   null
*/
function saveSpeaker()
{
	index=document.getElementById("proposalno").selectedIndex;
	for(i=1;i<=index+1;i++)
	{
		confselect = new Array();
		var obj = document.getElementById("conference"+i);
		//alert(obj);
		for(var j=0;j<obj.options.length;j++)
		{
			if(obj.options[j].selected)
			{
				confselect.push(obj.options[j].value);
			}
		}
		//alert(confselect);
		document.getElementById("hidconference"+i).value=confselect;

		trackselect = new Array();
		var obj = document.getElementById("conftrack"+i);
		//alert(obj);
		for(var j=0;j<obj.options.length;j++)
		{
			if(obj.options[j].selected)
			{
				trackselect.push(obj.options[j].value);
			}
		}
		//alert(trackselect);
		document.getElementById("hidconftrack"+i).value=trackselect;

		difficultselect = new Array();
		var obj = document.getElementById("difficult"+i);
		//alert(obj);
		for(var j=0;j<obj.options.length;j++)
		{
			if(obj.options[j].selected)
			{
				difficultselect.push(obj.options[j].value);
			}
		}
		//alert(difficultselect);
		document.getElementById("hiddifficult"+i).value=difficultselect;
	}
	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(/^ *$/))
	
	{
		firstNameMsg.innerHTML ="";
		firstNameMsg.innerHTML +="*Please enter first name.";
		document.getElementById("firstname").focus();
		return;
	}

	else if(document.getElementById("lastname").value.match(/^ *$/))
	
	{
		firstNameMsg.innerHTML ="";
		lastNameMsg.innerHTML ="";
		lastNameMsg.innerHTML +="*Please enter last name.";
		document.getElementById("lastname").focus();
		return;
	}
	else if(document.getElementById("company").value.match(/^ *$/))
	
	{
		lastNameMsg.innerHTML ="";
		companyMsg.innerHTML ="";
		companyMsg.innerHTML +="*Please enter your company.";
		document.getElementById("company").focus();
		return;
	}
	
	else if(document.getElementById("address1").value.match(/^ *$/))
	
	{
		companyMsg.innerHTML ="";
		AddressMsg.innerHTML ="";
		AddressMsg.innerHTML +="*Please enter your current address.";
		document.getElementById("address1").focus();
		return;
	}
	else if(document.getElementById("city").value.match(/^ *$/))
	
	{
		AddressMsg.innerHTML ="";
		cityMsg.innerHTML ="";
		cityMsg.innerHTML +="*Please enter your city.";
		document.getElementById("city").focus();
		return;
	}
	/*else if(document.getElementById("state").value.match(/^ *$/))
	
	{
		cityMsg.innerHTML ="";
		stateMsg.innerHTML ="";
		stateMsg.innerHTML +="*Please enter your state.";
		//alert("Please enter your state.");
		document.getElementById("state").focus();
		return;
	}*/
	/*else if((document.getElementById("pincode").value==null)||(document.getElementById("pincode").value==""))
	
	{
		stateMsg.innerHTML ="";
		zipMsg.innerHTML ="";
		zipMsg.innerHTML +="*Please enter your zip/postal code.";
		//alert("Please enter your zip/postal code.");
		document.getElementById("pincode").focus();
		return false;
	}*/
	else if(alphanumeric(document.getElementById("pincode").value)==false)
	
	{
		//zipMsg.innerHTML ="";
		zipMsg.innerHTML ="";
		zipMsg.innerHTML +="*Please enter a valid zip/postal code.";
		//alert("Please enter a valid zip/postal code.");
		document.getElementById("pincode").value=""
		document.getElementById("pincode").focus();
		return false;
	}
		
	else if(document.getElementById("country").value=='new')
	
	{
		zipMsg.innerHTML ="";
		countryMsg.innerHTML ="";
		countryMsg.innerHTML +="*Please select your country.";
		//alert("Please select your country.");
		document.getElementById("country").focus();
		return;
	}
	else if((document.getElementById("phone").value==null)||(document.getElementById("phone").value==""))
	
	{
		countryMsg.innerHTML ="";
		phoneMsg.innerHTML ="";
		phoneMsg.innerHTML +="*Please enter your phone number.";
		//alert("Please enter your phone number.");
		document.getElementById("phone").focus();
		return false;
	}
	
	
	
	/*else if((document.getElementById("handphone").value==null)||(document.getElementById("handphone").value==""))
	
	{
		faxMsg.innerHTML ="";
		handPhoneMsg.innerHTML ="";
		handPhoneMsg.innerHTML +="*Please enter your hand phone number.";
		//alert("Please enter your hand phone number.");
		document.getElementById("handphone").focus();
		return false;
	}*/
	
	
	else if(checkEmail(document.getElementById("email").value)!=true)
	{
		handPhoneMsg.innerHTML ="";
		emailMsg.innerHTML ="";
		emailMsg.innerHTML +="*Invalid E-mail Address! Please Enter valid E-mail Address.";
		document.getElementById("email").value=""
		document.getElementById("email").focus();
		
		return;
	}	
	
	
	else if(document.getElementById("biography").value.match(/^ *$/))
	
	{
		imageMsg.innerHTML ="";
		bioMsg.innerHTML ="";
		bioMsg.innerHTML +="*Please enter your biography.";
		//alert("Please enter your biography.");
		document.getElementById("biography").focus();
		return;
	}
	/*else if(document.getElementById("proposalTitle"+i).value.match(/^ *$/))
	
	{
		alert("Please enter the title of your proposal.");
		document.getElementById("proposalTitle"+i).focus();
		return;
	}
	else if(document.getElementById("abstract"+i).value.match(/^ *$/))
	
	{
		alert("Please enter short abstract.");
		document.getElementById("abstract"+i).focus();
		return;
	}
*/
	else if(document.getElementById("agree").checked==false)
	
	{
		bioMsg.innerHTML ="";
		callAgreeMsg.innerHTML ="";
		callAgreeMsg.innerHTML +="*Agree the above guidelines and the selection, notification, and responsibilities.";
		//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 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("expospace").value.match(/^ *$/))
	
	{
		alert("Please enter expo space.");
		document.getElementById("expospace").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("enrolment").value=='new')
	
	{
		alert("Please select your enrolment type.");
		document.getElementById("enrolment").focus();
		return;
	}
	
	return true;
}

/**
* 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("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 0px 0px 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(){
	
	regCode=document.getElementById("regCode").value;
	//alert(regCode);
	var myDate = new Date;
	myDate.setDate(31);
	myDate.setMonth(7); // January = 0
	myDate.setFullYear(2008);
	//alert(myDate);
	var today = new Date;
	var totalAmount;
	var totalAmount1;
	if(regCode=='BTS26SC')
	{
		document.getElementById("summitPass_1").value=2599;
		document.getElementById("summitPass_2").value=2599;
		document.getElementById("summitPass_3").value=4599;
		document.getElementById("summitPass_4").value=15999;
	}
	else
	{
	if (today < myDate)
	{
		if(regCode=='BTS063EM')
			document.getElementById("summitPass_4").value=0;
		else
			document.getElementById("summitPass_4").value=16999;
		if(regCode=='BTS045CB')
		{
			document.getElementById("summitPass_1").value=0;
			document.getElementById("summitPass_2").value=0;
			document.getElementById("summitPass_3").value=0;
			
		}
		else
		{
			document.getElementById("summitPass_1").value=2999;
			document.getElementById("summitPass_2").value=2999;
			document.getElementById("summitPass_3").value=4999;
			
		}
	}
	else
	{
		if(regCode=='BTS063EM')
			document.getElementById("summitPass_4").value=0;
		else
			document.getElementById("summitPass_4").value=17999;
		if(regCode=='BTS045CB')
		{
			document.getElementById("summitPass_1").value=0;
			document.getElementById("summitPass_2").value=0;
			document.getElementById("summitPass_3").value=0;
			
		}
		else
		{
			document.getElementById("summitPass_1").value=3999;
			document.getElementById("summitPass_2").value=3999;
			document.getElementById("summitPass_3").value=5999;
			
		}
	}
	}	
	
	/*if(document.getElementById("summitPass_gold").checked){
		totalAmount1=document.getElementById("summit_gold").value;
		if(document.getElementById("dayPass5").checked)
			totalAmount1 = parseInt(totalAmount1)+parseInt(document.getElementById("summitPass_5").value);
		
		totalAmount =parseInt(totalAmount1)+(totalAmount1*0.1236);
		totalAmount = Math.round(totalAmount);
		
			
	}*/
	
	
		totalAmount1=0;
		for(var i=1;i<5;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);
			}
		}
		
		totalAmount =parseInt(totalAmount1)+(totalAmount1*0.1236);
		totalAmount = Math.round(totalAmount);
	
	
	
	document.getElementById("netAmt").value=totalAmount1;
	document.getElementById("totalAmt").value=totalAmount;
}




/* 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<3)
			i=i+1;			
		else
			i=1;
		
		//alert(i);
		for(var j=1;j<4;j++){
			if(j==i)
		        document.getElementById("speaker"+i).style.display="";
			else
				document.getElementById("speaker"+j).style.display="none";
				
		}
		
		changeSpeaker();
	}



function downloadPresentation(presentation)
{
//alert(presentation);
    document.getElementById("action").value="downloadPresentation";
	 document.getElementById("hidPresentation").value=presentation;
    document.pageform.submit();

}



