/**
****************************************************************************
*
* Copyright             :   Great Indian Developer Summit © 2007-2008 by 
*							Advanced Millennium Technologies® Private Limited.
* Description           :   
* File-ID               :
* Author                :   Glyse George
* Date of Creation      :   05-Jan-2008 
* Date of Modification  :   
* Modified by           :   
* Modification          :   
*
****************************************************************************
*/

var i=1;

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/devIE6.css">');
	}
	else
	{
		//alert("ie7");
		document.write('<link rel="stylesheet" type="text/css" href="css/dev.css">');
	}
}  

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 notviewdevnet()
{
	document.getElementById('imgdotnetplus').style.display="";
	document.getElementById('imgdotnetminus').style.display="none";
	document.getElementById('bleedingdotnet').style.display="none";
	
}

function viewdevnet()
{
	document.getElementById('imgdotnetminus').style.display="";	
	document.getElementById('imgdotnetplus').style.display="none";
	document.getElementById('bleedingdotnet').style.display="";
}

function notviewdevwww()
{
	document.getElementById('imgwwwplus').style.display="";	
	document.getElementById('imgwwwminus').style.display="none";
	document.getElementById('web').style.display="none";
}

function viewdevwww()
{
	
	document.getElementById('imgwwwminus').style.display="";	
	document.getElementById('imgwwwplus').style.display="none";
	document.getElementById('web').style.display="";
}

function notviewdevjava()
{
	document.getElementById('imgjavaplus').style.display="";	
	document.getElementById('imgjavaminus').style.display="none";
	document.getElementById('dareJava').style.display="none";
}

function viewdevjava()
{
	document.getElementById('imgjavaminus').style.display="";	
	document.getElementById('imgjavaplus').style.display="none";
	document.getElementById('dareJava').style.display="";
}

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 Great Indian Developer 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 is reserved for sponsors with top billing, and has duration of 30 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 60 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 Developer Summit 2008 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 up to 4 panel participants (minimum 3). 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 Developer Summit 2008 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 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 Developer Summit 2008. This presentation of 60-minute duration should provide real-life examples of how the project/innovation has created a positive impact.</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 (beginner > Intermediate > advanced > Rocket Science > and so on) to the next. Hands-on workshop can be of half-day (180 minutes) duration or full day (360 minutes), and the speaker should be an expert in his area of presentation. 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";
}

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'></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:#FDA72C;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') ><div style='margin:0px 0px 10px 10px;_margin:0px 0px 10px 5px;cursor: pointer;color:#99127B;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:#99127B;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 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 style='margin: 5px 0px 0px 0px;_margin: 0px 0px 0px 0px;text-align:left;float:left;font-size:10pt;border:0px solid;'><p>Choose the Conference:</p></div>";
		presentation.innerHTML +="<div class='conflist'><select style='width:218px;height:55px' size='3' multiple='multiple' name='conference"+i+"' id='conference"+i+"' onchange='confTrack("+i+")'/></select></div>";
		presentation.innerHTML +="<div class='conflist'><input type='hidden' name='hidconference"+i+"' id='hidconference"+i+"' value=''></div>";
		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>Choose the Conference:</p></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 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>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 class='clear'></div>";
			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 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 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 #FDA72C;'></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;
			//if(document.getElementById("conftrack2"))
			//document.getElementById("conftrack2").options.length=0;
			//if(document.getElementById("conftrack3"))
			//document.getElementById("conftrack3").options.length=0;
			//if(document.getElementById("conftrack4"))
			//document.getElementById("conftrack4").options.length=0;
			//if(document.getElementById("conftrack5"))
			//document.getElementById("conftrack5").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;
					//var name1 =eval('document.pageform.'+name);
					//alert(name1);
					//name1.options[i] = new Option(value ,key);
					if(document.getElementById("conftrack"+tr))
					var name="conftrack"+tr;
					
					eval('document.pageform.'+name).options[i] = new Option(value ,key);
					//if(document.getElementById("conftrack"+tr))
					//	var name="conftrack"+tr;
					//document.forms['pageform'].eval(name).options[i] = new Option(value ,key);
					//if(document.getElementById("conftrack"+tr))
					//	var name="conftrack"+tr;
					//document.forms['pageform'].eval(name).options[i] = new Option(value ,key);
					//if(document.getElementById("conftrack"+tr))
					//	var name="conftrack"+tr;
					//document.forms['pageform'].eval(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+7;
	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:#FDA72C;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-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);<textarea id='txtDecr' name='txtDecr' style='overflow:auto;width:380px;height:150px;font-size:10pt;font-family:Arial, Helvetica, Sans-serif;margin:20px 0px 0px 30px;_margin:0px 0px -30px 30px;text-align:justify;'>
  		}
	}
}

//---------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 60 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 “Lightning Talks” of 15 minute duration.";
	messageArray[4]="The proposal type you have selected is “Case Studies” of 60 minute duration.";
	messageArray[5]="The proposal type you have selected is “Birds of Feather (BoF)” of 90-120 minute duration.";
	messageArray[6]="The proposal type you have selected is “Hands-on-Workshops” of half-day (180 minutes) duration or full day (360 minutes).";

	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]="Lightning Talks";
	headArray[4]="Case Studies";
	headArray[5]="Birds of Feather (BoF)";
	headArray[6]="Hands-on-Workshops";

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


}

/**
* 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  Contact 
*
* @access   public
* @param    null
*           
* @return   null
*/
function saveContact()
{
	//alert("sdfasd");
	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 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("investment").value.match(/^ *$/))
	
	{
		alert("Please enter your investment.");
		document.getElementById("investment").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 loadAwardCat(catId)
{
	//alert("nomination"+catId);
	
	a=document.getElementById('nomination'+catId);
	createNominee(catId);
	//alert(a);
	a.innerHTML +="<div style='width:100%;text-align:left;float:left;font-size:10pt;border:0px solid;' id='categoryDesc"+catId+"' name='categoryDesc"+catId+"'></div>";
	a.innerHTML +="<div style='clear:both'></div>";
	if(document.getElementById("nomination"+catId)==nomination11)
	{
		a.innerHTML +="<div style='width:165px;margin: 2px 0px 2px 0px;_margin: 3px 0px 0px 0px;text-align:left;font-size:10pt;border:0px solid;float:left'><p>Category:</p></div>";
		a.innerHTML +="<div style='width:570px;margin: 0px 0px 2px 5px;_margin: 0px 0px 0px 3px;text-align:left;float:left;border:0px solid;'><select style='width:270px' size='7' multiple='multiple' name='procategory[]' id='procategory' onchange='loadproductcategory("+catId+")'/></select></div>";
		
		a.innerHTML +="<div><input type='hidden' name='hidprocategory' id='hidprocategory' value=''></div>";
		a.innerHTML +="<div style='clear:both'></div>";
		
	}
	else
	{
	a.innerHTML +="<div style='clear:both'></div>";
	a.innerHTML +="<div style='width:165px;margin: 0px 0px 0px 0px;_margin: 0px 0px 0px 0px;text-align:left;float:left;font-size:10pt;border:0px solid;'><p>Nominee:</p></div>";
	a.innerHTML +="<div style='width:570px;margin: 0px 0px 2px 5px;_margin: 0px 0px 0px 1px;text-align:left;float:left;border:0px solid;'><input type='text' name='nominee"+catId+"' id='nominee"+catId+"' size='35' value=''></div>";
	a.innerHTML +="<div style='clear:both'></div>";
	a.innerHTML +="<div style='width:165px;margin: 0px 0px 0px 0px;_margin: 0px 0px 0px 0px;text-align:left;float:left;font-size:10pt;border:0px solid;'><p>Reason:</p></div>";
	a.innerHTML +="<div style='width:570px;margin: 0px 0px 2px 5px;_margin: 0px 0px 0px 1px;text-align:left;float:left;border:0px solid;'><input type='text' name='reason"+catId+"' id='reason"+catId+"' size='35' value=''></div>";
	a.innerHTML +="<div style='clear:both'></div>";
	a.innerHTML +="<div style='width:165px;margin: 0px 0px 0px 0px;_margin: 0px 0px 0px 0px;text-align:left;float:left;font-size:10pt;border:0px solid;'><p>Contact Details of Nominee:</p></div>";
	a.innerHTML +="<div style='width:570px;margin: 0px 0px 2px 5px;_margin: 0px 0px 10px 1px;text-align:left;float:left;border:0px solid;'><input type='text' name='contact"+catId+"' id='contact"+catId+"' size='35' value=''></div>";
	a.innerHTML +="<div class='proaward'></div>";
	}
	document.getElementById('btnplusimage'+catId).style.display="none";
	document.getElementById('btnminusimage'+catId).style.display="";
	
	//b.innerHTML="<input  type='button'  class='minusImage'>";
	//createNominee(catId);
	
//categoryList();
}

function loadproductcategory(catId)
{
	b=document.getElementById('productCat');
	
	//alert(document.getElementById('procategory').selectedIndex+1);
	selectedId = new Array();
	selectedText = new Array();
	var obj = document.getElementById("procategory");
		for(var i=0;i<obj.options.length;i++)
		{
			
			if(obj.options[i].selected)
			{
				
				catText=obj.options[i].text;
				catval=obj.options[i].value;
				selectedText.push(catText);
				selectedId.push(catval);
			
			}
			
		}
		//alert(catval);
		b.innerHTML='';
		for(i=0;i<selectedId.length;i++)
		{
			//alert(catval);
			
			b.innerHTML +="<div class='proaward'></div>";
			b.innerHTML +="<div style='width:165px;margin: 2px 0px 2px 0px;_margin: 0px 0px 0px 0px;text-align:left;float:left;font-size:10pt;border:0px solid;'><p>Track:</p></div>";
			b.innerHTML +="<div style='width:570px;margin: 0px 0px 2px 5px;_margin: 0px 0px 0px 3px;text-align:left;float:left;border:0px solid;'><div style='font-size:10pt;font-weight:bold' >"+selectedText[i]+"</div></div>";
			b.innerHTML +="<input type='hidden' name='track"+catval+"' id='track"+catval+"' value=''>";
			b.innerHTML +="<div style='clear:both'></div>";
			b.innerHTML +="<div style='width:165px;margin: 0px 0px 0px 0px;_margin: 0px 0px 0px 0px;text-align:left;float:left;font-size:10pt;border:0px solid;'><p>Nominee:</p></div>";
			b.innerHTML +="<div style='width:570px;margin: 0px 0px 2px 5px;_margin: 0px 0px 0px 1px;text-align:left;float:left;border:0px solid;'><input type='text' name='nominee"+selectedId[i]+"' id='nominee"+selectedId[i]+"' size='35' value=''></div>";
			b.innerHTML +="<div style='clear:both'></div>";
			b.innerHTML +="<div style='width:165px;margin: 0px 0px 0px 0px;_margin: 0px 0px 0px 0px;text-align:left;float:left;font-size:10pt;border:0px solid;'><p>Reason:</p></div>";
			b.innerHTML +="<div style='width:570px;margin: 0px 0px 2px 5px;_margin: 0px 0px 0px 1px;text-align:left;float:left;border:0px solid;'><input type='text' name='reason"+selectedId[i]+"' id='reason"+selectedId[i]+"' size='35' value=''></div>";
			b.innerHTML +="<div style='clear:both'></div>";
			b.innerHTML +="<div style='width:165px;margin: 0px 0px 0px 0px;_margin: 0px 0px 0px 0px;text-align:left;float:left;font-size:10pt;border:0px solid;'><p>Contact Details of Nominee:</p></div>";
			b.innerHTML +="<div style='width:570px;margin: 0px 0px 2px 5px;_margin: 0px 0px 10px 1px;text-align:left;float:left;border:0px solid;'><input type='text' name='contact"+selectedId[i]+"' id='contact"+selectedId[i]+"' size='35' value=''></div>";
			b.innerHTML +="<div class='proaward'></div>";
		}
		
}

function notloadcategory(catid)
	{
		
		//alert(d);
		a=document.getElementById('nomination'+catid);
		document.getElementById('btnminusimage'+catid).style.display="none";
		//.style.display="none";
		document.getElementById('btnplusimage'+catid).style.display="";
		a.innerHTML='';
		b.innerHTML='';
		
	}

function createNominee(catId)
{
	//alert(i);
	var createNomin;	
	
	
		createNomin = "awards.html?action=createNomination&catId="+catId+"";
		http = getHTTPObject(); // We create the HTTP Object
		document.getElementById('loading'+catId).style.display="";
		http.open("GET", createNomin, true);
		http.onreadystatechange = function (){HttpResponseNomin(catId)};
		http.send(null);
}

function HttpResponseNomin(catId)
{
	if (http.readyState == 4)
	{  
		// only if "OK"
        if (http.status == 200)
		{
			
			 // http.responseText;
			var sr=eval("("+http.responseText+")");
					
			if((sr['categoryArray'].length)>0)
			{
						
				key = sr.categoryArray[0].key;	
				decr = sr.categoryArray[0].value;	
				result="<p>"+decr+"</p>";	
				
			}
			for(i = 0; i < sr['proCategoryArray'].length; i++)
				{	
					key = sr.proCategoryArray[i].key;
					value = sr.proCategoryArray[i].value;	
					
					
					if(document.getElementById("procategory"))
					document.forms['pageform'].procategory.options[i] = new Option(value ,key);
					
					
				}
			document.getElementById('categoryDesc'+catId).innerHTML = result;
			document.getElementById('loading'+catId).style.display="none";	
			
			
  		}
	}
}

/**
* 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(document.getElementById("company").value.match(/^ *$/))
	
	{
		alert("Please enter your company");
		document.getElementById("company").focus();
		return;
	}
	else if(document.getElementById("designation").value.match(/^ *$/))
	
	{
		alert("Please enter your designaion");
		document.getElementById("designation").focus();
		return;
	}

	else if(checkEmail(document.getElementById("email").value)!=true)
	{
		alert("*Invalid E-mail Address! Please Enter valid E-mail Address.");
		document.getElementById("email").focus();
		return;
	}	
	else if(document.getElementById("mobile").value.match(/^ *$/))
	
	{
		alert("Please enter your Hand phone number");
		document.getElementById("mobile").focus();
		return;
	}
	else if(document.getElementById("city").value.match(/^ *$/))
	
	{
		alert("Please enter your city");
		document.getElementById("city").focus();
		return;
	}
	else if(document.getElementById("country").selectedIndex==0)
	
	{
		alert("Please enter your country");
		document.getElementById("country").focus();
		return;
	}
	var flag=false;
	for(i=8;i<12;i++){
		var test="nomination"+i;
		if(document.getElementById(test).innerHTML!="")
		flag=true;

	}
	if(flag==false)
	
	{		
		alert("Please select the category");
		//document.getElementById("city").focus();
		return;
	}
	if(document.getElementById("nomination8").innerHTML!=""){
		if(document.getElementById("nominee8").value.match(/^ *$/)){
			alert("Please enter your nominee");
			document.getElementById("nominee8").focus();
			return;
		}
		else if(document.getElementById("reason8").value.match(/^ *$/)){
			alert("Please enter your reason");
			document.getElementById("reason8").focus();
			return;
		}
		else if(document.getElementById("contact8").value.match(/^ *$/)){
			alert("Please enter contact details of nominee");
			document.getElementById("contact8").focus();
			return;
		}
	}
	if(document.getElementById("nomination9").innerHTML!=""){
		if(document.getElementById("nominee9").value.match(/^ *$/)){
			alert("Please enter your nominee");
			document.getElementById("nominee9").focus();
			return;
		}
		else if(document.getElementById("reason9").value.match(/^ *$/)){
			alert("Please enter your reason");
			document.getElementById("reason9").focus();
			return;
		}
		else if(document.getElementById("contact9").value.match(/^ *$/)){
			alert("Please enter contact details of nominee");
			document.getElementById("contact9").focus();
			return;
		}
	}
	if(document.getElementById("nomination10").innerHTML!=""){
		if(document.getElementById("nominee10").value.match(/^ *$/)){
			alert("Please enter your nominee");
			document.getElementById("nominee10").focus();
			return;
		}
		else if(document.getElementById("reason10").value.match(/^ *$/)){
			alert("Please enter your reason");
			document.getElementById("reason10").focus();
			return;
		}
		else if(document.getElementById("contact10").value.match(/^ *$/)){
			alert("Please enter contact details of nominee");
			document.getElementById("contact10").focus();
			return;
		}
	}
	if(document.getElementById("nomination11").innerHTML!=""){
		if(document.getElementById("procategory").selectedIndex==-1){
			alert("Please select Products Par Excellence category");
			document.getElementById("procategory").focus();
			return;
		}
		for(j=0;j<12;j++){
			//alert(j);
			var num=j+1;
		 if(document.getElementById("procategory").selectedIndex==j){
			if(document.getElementById("nominee"+num).value.match(/^ *$/)){
				alert("Please enter your nominee");
				document.getElementById("nominee"+num).focus();
				return;
			}
			else if(document.getElementById("reason"+num).value.match(/^ *$/)){
				alert("Please enter your reason");
				document.getElementById("reason"+num).focus();
				return;
			}
			else if(document.getElementById("contact"+num).value.match(/^ *$/)){
				alert("Please enter your contact");
				document.getElementById("contact"+num).focus();
				return;
			}
			
		}
	}
		
	}
	
	return true;
}

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

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

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

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

//************** 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********************

/**
* This fuction is used to save Registration details
*
* @access   public
* @param    null
*           
* @return   null
*/
function saveRegister1()
{
	
			if(validationRegister1())
	{		
			document.getElementById("action").value="SaveRegister1";
            document.getElementById("pageform").submit();
	}
		 
			
}

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

function validationRegister1()
{
	if(document.getElementById("firstname").value.match(/^ *$/))
	
	{
		firstNameMsg.innerHTML ="";
		firstNameMsg.innerHTML +="*Please enter first name.";
		//document.getElementById("firstNameMsg").value="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.";
		//alert("Please enter last name.");
		document.getElementById("lastname").focus();
		return;
	}
	else if(document.getElementById("designation").value.match(/^ *$/))
	
	{
		lastNameMsg.innerHTML ="";
		desigMsg.innerHTML ="";
		desigMsg.innerHTML +="*Please enter your designation.";
		//alert("Please enter your designation.");
		document.getElementById("designation").focus();
		return;
	}
	else if(document.getElementById("company").value.match(/^ *$/))
	
	{
		desigMsg.innerHTML ="";
		companyMsg.innerHTML ="";
		companyMsg.innerHTML +="*Please enter your company.";
		//alert("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.";
		//alert("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.";
		//alert("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 (checkInternationalPhone(document.getElementById("phone").value)==false){

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

	else if (checkInternationalPhone(document.getElementById("fax").value)==false){

		phoneMsg.innerHTML ="";
		faxMsg.innerHTML ="";
		faxMsg.innerHTML +="*Please enter a valid fax number.";
		//alert("Please enter a valid fax number")
		document.getElementById("fax").value=""
		document.getElementById("fax").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 (checkInternationalPhone(document.getElementById("handphone").value)==false){

		//handPhoneMsg.innerHTML ="";
		handPhoneMsg.innerHTML ="";
		handPhoneMsg.innerHTML +="*Please enter a valid hand phone number.";
		//alert("Please enter a valid hand phone number")
		document.getElementById("handphone").value=""
		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;
	}	
	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 calculateAmount(){

	var myDate = new Date;
	myDate.setDate(29);
	myDate.setMonth(7); // January = 0
	myDate.setFullYear(2008);
	//alert(myDate);
	var today = new Date;
	var totalAmount;
	var totalAmount1;
	if (today < myDate)
	{
	if(document.getElementById("summitPass_gold").checked){
		totalAmount1=document.getElementById("summitPass_1").value;
		
		totalAmount =parseInt(totalAmount1)+(totalAmount1*0.1236);
		totalAmount = Math.round(totalAmount);
		for(var i=2;i<5;i++){
			document.pageform.summitPass[i].disabled=true;
		}
		
		
	}
	else
	{
		totalAmount1=0;
		for(var i=2;i<5;i++)
		{
			id="summitPass_"+i;
			//alert(document.pageform.summitPass[i].value);
			if(document.pageform.summitPass[i].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;
}

function disableCheckBox(){
	if(document.getElementById("summitPass_gold").checked)
		value=true;
	else
		value=false;
	
	for(var i=2;i<5;i++){
			document.pageform.summitPass[i].disabled=value;
			document.pageform.summitPass[i].checked=true;
		}
}





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

	function divLayer(){
		
		var test;
		test=document.getElementById("highslide-html1").innerHTML;
		//alert(test);
		return test;
	}

	function changeSpeaker()
	{
		try {
        clearTimeout(to);
    } catch (e) {}

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

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

	/*function changeExhibitor()
	{
		try {
        clearTimeout(to1);
    } catch (e) {}

    to1 = setTimeout("nextExhibitor()", 3000);//3 sec
	}

	function nextExhibitor()
	{
		//alert("dfgd");
		if(i<2)
			i=i+1;			
		else
			i=1;
		
		//alert(i);
		for(var j=1;j<3;j++){
			if(j==i)
		        document.getElementById("Exhibitor"+i).style.display="";
			else
				document.getElementById("Exhibitor"+j).style.display="none";
				
		}
		
		changeExhibitor();
	}*/

	function bulkBooking()
	{
		if(document.getElementById("bulkCode").value.match(/^ *$/))
	
		{
			document.getElementById("bulkCodeMsg").style.display="";
			bulkCodeMsg.innerHTML ="";
			bulkCodeMsg.innerHTML +="*Please enter bulk booking code.";
			//alert("Please enter your phone number.");
			document.getElementById("bulkCode").focus();
			return false;
		}
	
	
	else if(document.getElementById("coordinator").value.match(/^ *$/))
	
		{
			document.getElementById("coordinatorMsg").style.display="";
			coordinatorMsg.innerHTML ="";
			coordinatorMsg.innerHTML +="*Please enter coordinator name.";
			//alert("Please enter your phone number.");
			document.getElementById("coordinator").focus();
			return false;
		}
	
	if(checkEmail(document.getElementById("bulkEmail").value)!=true)
	
		{
			
		document.getElementById("bulkEmailMsg").style.display="";
		bulkEmailMsg.innerHTML ="";
		bulkEmailMsg.innerHTML +="*Enter valid E-mail Address.";
		document.getElementById("bulkEmail").value=""
		document.getElementById("bulkEmail").focus();
		
		return false;
	
			
		}

		document.getElementById("action").value="bulkBooking";
        document.getElementById("pageform").submit();
	}

/*********************************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 viewVoteLayer(e,nominee,nomineeDiv,anchorDiv,catId,nomineId,divId)
{
	
	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-140;
		document.getElementById(divId).style.top = posy+130+"px";
		//posy = e.pageY-180;
		//document.getElementById(divId).style.top = 150;
		document.getElementById(divId).style.left=270 ;
	}
	
	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= 245;
		
	}
	document.getElementById("votefirst").value="true";
	//alert(document.getElementById("catNominee_15").value);
	
	document.getElementById(nominee).value=nomineId;
	document.getElementById("categoryAnchor").value=anchorDiv;

	for(var i=1 ;i<10;i++){

		var nominiDiv2="nominee_"+catId+"_"+i;
		if(document.getElementById(nominiDiv2))
		   document.getElementById(nominiDiv2).className="award_vote_disabled";

	}
	document.getElementById(nomineeDiv).className="award_vote_enabled";

	document.getElementById(divId).style.display="";
	result="<div id='handle' width='100%' style=background:#99127B;height:20px;_height:25px;cursor:move' ></div>";
	result+="<div style='text-align:center;color:white;font-size:15px;font-weight:bold;border:0px solid;margin:5px 5px 5px 5px;font-family:Arial, Helvetica, Sans-serif '>Do you want to vote for another category?</div>";		
	result+="<div style='clear:both;height:20px'></div>";		
	result+="<div style='text-align:center;color:white;font-size:15px;font-weight:bold;border:0px solid;margin:5px 5px 5px 5px;font-family:Arial, Helvetica, Sans-serif '><input style='width:80px;height:25px;border:none' type='button' name='' id='' value='YES' onclick='viewNextCategory()'  class= 'button1'  onmouseover=this.className='button_over1'	onmouseout=this.className='button_out1' >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href='#savevote' style='text-decoration:none'><input style='width:80px;height:25px;border:none' type='button' name='' id='e' value='NO' onclick=document.getElementById('awardvotelayer').style.display='none';  class= 'button1'  onmouseover=this.className='button_over1'	onmouseout=this.className='button_out1' ></a></div>";		
	/*if(document.getElementById("categoryAnchor").value=='category1')
	{
		//getVacantCategory();
		result="<div id='handle' width='100%' style=background:#99127B;height:20px;_height:25px;cursor:move' ></div>";
		result+="<div style='text-align:center;color:white;font-size:15px;font-weight:bold;border:0px solid;margin:5px 5px 5px 5px;font-family:Arial, Helvetica, Sans-serif '>You have voted for the above categories, please complete your voting process</div>";		
		result+="<div style='clear:both;height:20px'></div>";		
		result+="<div style='text-align:center;color:white;font-size:15px;font-weight:bold;border:0px solid;margin:5px 5px 5px 5px;font-family:Arial, Helvetica, Sans-serif '><a href='#savevote' style='text-decoration:none'><input style='width:80px;height:25px;border:none' type='button' name='' id='' value='OK' onclick=document.getElementById('awardvotelayer').style.display='none'  class= 'button1'  onmouseover=this.className='button_over1'	onmouseout=this.className='button_out1' ></a></div>";		
		
	}*/
	document.getElementById(divId).innerHTML = result;
	divDrag(divId);
	
}

function viewVoteLayernew(e,nominee,nomineeDiv,anchorDiv,catId,nomineId,divId)
{
	
	
	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-140;
		document.getElementById(divId).style.top = posy+130+"px";
		//posy = e.pageY-180;
		//document.getElementById(divId).style.top = 150;
		document.getElementById(divId).style.left=270 ;
	}
	
	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= 245;
		
	}
	/*document.getElementById("votefirst").value="true";
	//alert(document.getElementById("catNominee_15").value);
	
	document.getElementById(nominee).value=nomineId;
	document.getElementById("categoryAnchor").value=anchorDiv;*/

	/*for(var i=1 ;i<10;i++){

		var nominiDiv2="nominee_"+catId+"_"+i;
		if(document.getElementById(nominiDiv2))
		   document.getElementById(nominiDiv2).className="award_vote_disabled";

	}*/
	//document.getElementById(nomineeDiv).className="award_vote_enabled";

	document.getElementById(divId).style.display="";
	result="<div id='handle' width='100%' style=background:#99127B;height:20px;_height:25px;cursor:move' ></div>";
	result+="<div style='text-align:center;color:white;font-size:15px;font-weight:bold;border:0px solid;margin:5px 5px 5px 5px;font-family:Arial, Helvetica, Sans-serif '>Sorry Voting for Great Indian Developer Awards 2008 Is Closed!</div>";		
	result+="<div style='clear:both;height:20px'></div>";		
	result+="<div style='text-align:center;color:white;font-size:15px;font-weight:bold;border:0px solid;margin:5px 5px 5px 5px;font-family:Arial, Helvetica, Sans-serif '><input style='width:80px;height:25px;border:none' type='button' name='' id='' value='OK' onclick='closeAwardLayer()'  class= 'button1'  onmouseover=this.className='button_over1'	onmouseout=this.className='button_out1' ></div>";		
	/*if(document.getElementById("categoryAnchor").value=='category1')
	{
		//getVacantCategory();
		result="<div id='handle' width='100%' style=background:#99127B;height:20px;_height:25px;cursor:move' ></div>";
		result+="<div style='text-align:center;color:white;font-size:15px;font-weight:bold;border:0px solid;margin:5px 5px 5px 5px;font-family:Arial, Helvetica, Sans-serif '>You have voted for the above categories, please complete your voting process</div>";		
		result+="<div style='clear:both;height:20px'></div>";		
		result+="<div style='text-align:center;color:white;font-size:15px;font-weight:bold;border:0px solid;margin:5px 5px 5px 5px;font-family:Arial, Helvetica, Sans-serif '><a href='#savevote' style='text-decoration:none'><input style='width:80px;height:25px;border:none' type='button' name='' id='' value='OK' onclick=document.getElementById('awardvotelayer').style.display='none'  class= 'button1'  onmouseover=this.className='button_over1'	onmouseout=this.className='button_out1' ></a></div>";		
		
	}*/
	document.getElementById(divId).innerHTML = result;
	divDrag(divId);
	
}

function closeAwardLayer(){
	document.getElementById("awardvotelayer").style.display="none";
}




function viewNextCategory(){
	
	document.getElementById("awardvotelayer").style.display="none";
	if(document.getElementById("catNominee_15").value)
		document.getElementById("votefirst").value="false";

if(document.getElementById("votefirst").value=="true"){
	
	window.location.hash=document.getElementById("categoryAnchor").value;
}
else{
	
	for(var i=1;i<16;i++){		
		var catno="catNominee_"+i;
		
		
		if(!document.getElementById(catno).value){

			
				var j=i;
				
			
			//document.getElementById("categoryAnchor").value="category"+j;

			window.location.hash="category"+j;
	
			
			//viewNextCategory();
			return;
		}
		
		

	 }
		document.getElementById("awardvotelayer").style.display="";
		var result;
		result="<div id='handle' width='100%' style=background:#99127B;height:20px;_height:25px;cursor:move' ></div>";
		result+="<div style='text-align:center;color:white;font-size:15px;font-weight:bold;border:0px solid;margin:5px 5px 5px 5px;font-family:Arial, Helvetica, Sans-serif '>You have voted for all the categories, please complete your voting process</div>";		
		result+="<div style='clear:both;height:20px'></div>";		
		result+="<div style='text-align:center;color:white;font-size:15px;font-weight:bold;border:0px solid;margin:5px 5px 5px 5px;font-family:Arial, Helvetica, Sans-serif '><a href='#savevote' style='text-decoration:none'><input style='width:80px;height:25px;border:none' type='button' name='' id='' value='OK' onclick=document.getElementById('awardvotelayer').style.display='none'  class= 'button1'  onmouseover=this.className='button_over1'	onmouseout=this.className='button_out1' ></a></div>";		
		document.getElementById("awardvotelayer").innerHTML = result;
   }
	
}

function continueVote()
{
	//alert(document.getElementById("votefirst").value);
	if(document.getElementById("votefirst").value=="proceed")
		window.location.hash="savevote";
	else if(document.getElementById("votefirst").value!="false")
		viewNextCategory();
	else
		window.location.hash="savevote";
	
}

function saveVote(){
	document.getElementById("votefirst").value="proceed";
	if(document.getElementById("fullname").value.match(/^ *$/)){
		document.getElementById("fullname").value=""
		alert("Please Enter Your Name");
		document.getElementById("fullname").focus();		
		return;
	}
	else if(document.getElementById("company").value.match(/^ *$/))
	{
		
		document.getElementById("company").value=""
		alert("Please Enter Your Company");
		document.getElementById("company").focus();
		
		return;
	}
	else if(document.getElementById("email").value.match(/^ *$/))
	{
		
		document.getElementById("email").value=""
		alert("Please Enter Your Email Id");
		document.getElementById("email").focus();
		
		return;
	}

	else if(checkEmail(document.getElementById("email").value)!=true)
	{
		
		document.getElementById("email").value=""
		alert("Inavlid Email Id");
		document.getElementById("email").focus();
		
		return;
	}
	else if(document.getElementById("phone").value.match(/^ *$/))
	{
		
		document.getElementById("phone").value=""
		alert("Please Enter Your Phone Number");
		document.getElementById("phone").focus();
		
		return;
	}
	else if (checkInternationalPhone3(document.getElementById("phone").value)==false){

		document.getElementById("phone").value=""
		alert("Please Enter Your Valid Phone Number");
		document.getElementById("phone").focus();
		
		return false;
	}
	else
	{
		var checkvote="false";
		for(var i=1;i<16;i++){		
		var catno="catNominee_"+i;		
		if(document.getElementById(catno).value){	
			checkvote="true";
			
		}
		}

		if(checkvote=="false"){
			alert("You have not voted for any category");
			viewNextCategory();
			return
		}
	}
	
	document.getElementById("action").value="SaveVotes";
     document.getElementById("pageform").submit();
}

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 saveDevFest()
{
	if(document.getElementById("devName").value.match(/^ *$/)){
		document.getElementById("devName").value=""
		alert("Please Enter Your Name");
		document.getElementById("devName").focus();		
		return;
	}
	else if(document.getElementById("devOrganization").value.match(/^ *$/))
	{
		
		document.getElementById("devOrganization").value=""
		alert("Please Enter Your Organization");
		document.getElementById("devOrganization").focus();
		
		return;
	}
	else if(document.getElementById("devEmail").value.match(/^ *$/))
	{
		
		document.getElementById("devEmail").value=""
		alert("Please Enter Your Email Id");
		document.getElementById("devEmail").focus();
		
		return;
	}

	else if(checkEmail(document.getElementById("devEmail").value)!=true)
	{
		
		document.getElementById("devEmail").value=""
		alert("Inavlid Email Id");
		document.getElementById("devEmail").focus();
		
		return;
	}
	else if(document.getElementById("devPhone").value.match(/^ *$/))
	{
		
		document.getElementById("devPhone").value=""
		alert("Please Enter Your Handphone Number");
		document.getElementById("devPhone").focus();
		
		return;
	}
	document.getElementById("action").value="SaveDaveFest";
     document.getElementById("pageform").submit();
}


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

}




/*********************************Main Navigation Script Ends*******************************/

/*########################################################################
##########
#
# (c) Great Indian Developer Summit © 2007-2008 
#     Advanced Millennium Technologies® Private Limited.
#
# All Rights Reserved.
#
# This piece of code is copyright protected.
#
# Any person copying this code is liable for punishment 
# under criminal offence.
#
#
########################################################################
###########*/