// JavaScript Document
function openDD(obj, ddId){
	document.getElementById(ddId).style.display = "block"
}
function openDC(obj, ddId){
	document.getElementById(ddId).style.display = "none"
}
function show(Id){
	document.getElementById(Id).style.display = "block"
}
function hide(Id){
	document.getElementById(Id).style.display = "none"
}
stepcarousel.setup({
	galleryid: 'mygallery',
	beltclass: 'belt',
	panelclass: 'panel',
	autostep: {enable:true, moveby:1, pause:3000},
	panelbehavior: {speed:500, wraparound:false, persist:true},
	defaultbuttons: {enable: true, moveby: 1, leftnav: ['images/leftArrow.gif', -40, 25], rightnav: ['images/rightArrow.gif', 10, 25]},
	statusvars: ['statusA', 'statusB', 'statusC'], 
	contenttype: ['inline'] 
})

function getPageScroll(){

	var yScroll;

	if (self.pageYOffset) {
		yScroll = self.pageYOffset;
	} else if (document.documentElement && document.documentElement.scrollTop){	 // Explorer 6 Strict
		yScroll = document.documentElement.scrollTop;
	} else if (document.body) {// all other Explorers
		yScroll = document.body.scrollTop;
	}

	arrayPageScroll = new Array('',yScroll) 
	return arrayPageScroll;
}

function getPageSize(){
	
	var xScroll, yScroll;
	
	if (window.innerHeight && window.scrollMaxY) {	
		xScroll = document.body.scrollWidth;
		yScroll = window.innerHeight + window.scrollMaxY;
	} else if (document.body.scrollHeight > document.body.offsetHeight){ // all but Explorer Mac
		xScroll = document.body.scrollWidth;
		yScroll = document.body.scrollHeight;
	} else { // Explorer Mac...would also work in Explorer 6 Strict, Mozilla and Safari
		xScroll = document.body.offsetWidth;
		yScroll = document.body.offsetHeight;
	}
	
	var windowWidth, windowHeight;
	if (self.innerHeight) {	// all except Explorer
		windowWidth = self.innerWidth;
		windowHeight = self.innerHeight;
	} else if (document.documentElement && document.documentElement.clientHeight) { // Explorer 6 Strict Mode
		windowWidth = document.documentElement.clientWidth;
		windowHeight = document.documentElement.clientHeight;
	} else if (document.body) { // other Explorers
		windowWidth = document.body.clientWidth;
		windowHeight = document.body.clientHeight;
	}	
	
	// for small pages with total height less then height of the viewport
	if(yScroll < windowHeight){
		pageHeight = windowHeight;
	} else { 
		pageHeight = yScroll;
	}

	// for small pages with total width less then width of the viewport
	if(xScroll < windowWidth){	
		pageWidth = windowWidth;
	} else {
		pageWidth = xScroll;
	}
	arrayPageSize = new Array(pageWidth,pageHeight,windowWidth,windowHeight);
	return arrayPageSize;
}
function showLightbox(Ids){
	var lightboxWidth='500';
	var objImg = document.getElementById('all_Img');
	var objOverlay = document.getElementById('shadowoverlay');
	var objLightbox = document.getElementById(Ids);	
	var arrayPageSize = getPageSize();
	var arrayPageScroll = getPageScroll();
	objOverlay.style.height = (arrayPageSize[1] + 'px');
	objImg.src="images/circle_11.gif";
	objOverlay.style.display = 'block';
	objOverlay.style.zIndex = '90';		
	objLightbox.style.display = 'block';
	var lightboxHeight = objLightbox.offsetHeight;
	var lightboxTop = arrayPageScroll[1] + ((arrayPageSize[3] - 35 - lightboxHeight) / 2);
	var lightboxLeft = ((arrayPageSize[0] - 20 - lightboxWidth) / 2);
	//objLightbox.style.top = (lightboxTop < 0) ? "0px" : lightboxTop + "px";
	//objLightbox.style.left = (lightboxLeft < 0) ? "0px" : lightboxLeft + "px";
	//objLightbox.style.zIndex = '100';
	arrayPageSize = getPageSize();
	objOverlay.style.height = (arrayPageSize[1] + 'px');
}
function hideLightbox(Ids){
	var objImg = document.getElementById('all_Img');
	var objOverlay = document.getElementById('shadowoverlay');
	var objLightbox = document.getElementById(Ids);
	objImg.src="images/circle_12.gif";
	objLightbox.style.display = 'none';
	objOverlay.style.display = 'none';

}
function hideLightbox_all(){
	var objOverlay = document.getElementById('shadowoverlay');

	var objImg = document.getElementById('all_Img');	
	objImg.src="images/circle_12.gif";
	for(i=1;i<=12;i++){
		var lightBx = "lightbox"+i;
		document.getElementById(lightBx).style.display = "none";
	}
	objOverlay.style.display = 'none';
}
function createSub(select_value){
	//alert(2);
	var objContainer = document.getElementById('sHTML');
	var emailInput = document.getElementById('clb_em');
	sInnerHTML = '';
	sInnerHTML ="<select name='sEntCat' id='sEntCat' style='width:295px'><option value='' selected='selected'>Select</option>";	
	if(select_value==1){
		emailInput.value = "passion11.marketing@gmail.com";
		sInnerHTML +="<option value='vgovernance'>V-Govern</option>";
	} else if(select_value==2){
		emailInput.value = "passion11.bplan@gmail.com";
		//emailInput.value = "passion11.marketing@gmail.com";
		//sInnerHTML +="<option value='No honour among thieves'>No honour among thieves - Dare to think on your feet</option>";
		sInnerHTML +="<option value='bplan'>B-Plan</option>";
	} else if(select_value==3){
		emailInput.value = "passion11.finance@gmail.com";
		//emailInput.value = "passion11.financialinvestments@gmail.com";
		//sInnerHTML +="<option value='Equinox'>Equinox - Dare to invest</option>";
		sInnerHTML +="<option value='finspint'>FINsprint</option>";
	} else if(select_value==4){
		emailInput.value = "passion11.humanresource@gmail.com";
		//emailInput.value = "passion11.internationalbusiness@gmail.com";
		//sInnerHTML +="<option value='Dartem up'>Dart'em up - Dare to aim</option>";
		sInnerHTML +="<option value='mahpath'>maHRath</option>";
	} else if(select_value==5){
		emailInput.value = "passion11.operations@gmail.com";
		//sInnerHTML +="<option value='Inception'>Inception - Dare to dream</option>";
		sInnerHTML +="<option value='oopsinc'>OOPS Inc.</option>";
	} else if(select_value==6){
		emailInput.value = "passion11.Consultancy@gmail.com";
		sInnerHTML +="<option value='paramarsh'>PARAMARSH</option>";
		//sInnerHTML +="<option value='Slide rule'>Slide rule - Dare to connect</option>";
		//sInnerHTML +="<option value='Volte face'>Volte face - Dare to double back</option>";		
	} else if(select_value==7){
		emailInput.value = "passion11.informationtechnology@gmail.com";
		sInnerHTML +="<option value='velocita'>velocITa</option>";
		//sInnerHTML +="<option value='Abhivyakthi'>Abhivyakthi - Dare to express through pictures</option>";
	} else if(select_value==8){
		emailInput.value = "passion11.marketing@gmail.com";
		sInnerHTML +="<option value='marxpeed'>MARxpeed</option>";
		//sInnerHTML +="<option value='L'>Lean wars - Dare to evolve</option>";
		
		//sInnerHTML +="<option value='Yuva ventura'>Yuva ventura - Dare to adapt</option>";
	} else if(select_value==9){
		emailInput.value = "passion11.socialresponsibility@gmail.com";
		sInnerHTML +="<option value='ekagrata'>Ekagrata</option>";
		//sInnerHTML +="<option value='Evolve'>Evolve - Dare to be different</option>";
	} else if(select_value==10){
		emailInput.value = "passion11.cultural@gmail.com";
		//sInnerHTML +="<option value='Mirage'>Mirage - Dare to unravel</option>";
		//sInnerHTML +="<option value='Nu kriger'>Nu kriger - Dare to cerebrate</option>";
	}/* else if(select_value==11){
		emailInput.value = "passion10.entrepreneurship@gmail.com";
		sInnerHTML +="<option value='Apperentice reloaded'>Apperentice reloaded - Dare to step into the firing line</option>";
		sInnerHTML +="<option value='Chequered flag'>Chequered flag - Dare to make your formula win</option>";
	} else if(select_value==12){
		emailInput.value = "passion10.mediarelations@gmail.com";
		sInnerHTML +="<option value='Ad Madden'>Ad madden - Dare to alter</option>";
	} else{
		emailInput.value = "passion10.cultural@gmail.com";
		//sInnerHTML +="<option value='Cultural'>Cultural</option>";
		sInnerHTML +="<option value='Flamenco'>Flamenco</option>";
		//sInnerHTML +="<option value='Battle of the bands'>Battle of the bands</option>";
		sInnerHTML +="<option value='Jhoom barabar jhoom'>Jhoom barabar jhoom (antakshari)</option>";
		sInnerHTML +="<option value='Tech Raag'>Tech Raag (composition)</option>";
		sInnerHTML +="<option value='Unplugged'>Unplugged</option>";
		sInnerHTML +="<option value='Alaap'>Alaap (Solo vocals)</option>";
		sInnerHTML +="<option value='War of the DJ'>War of the DJ's</option>";
		sInnerHTML +="<option value='Verbose'>Verbose (debate)</option>";
		//sInnerHTML +="<option value='Blab'>Blab</option>";
		sInnerHTML +="<option value='Newswired'>Newswired</option>";
		sInnerHTML +="<option value='Atelier'>Atelier</option>";
		//sInnerHTML +="<option value='Art painting'>Art painting</option>";
		sInnerHTML +="<option value='Rang Manch'>Rang Manch - stage play</option>";
		//sInnerHTML +="<option value='Star night'>Star night</option>";
		//sInnerHTML +="<option value='Labours of Hercules'>Labours of Hercules</option>";
		sInnerHTML +="<option value='Director 3'>Director 3 (MMS, photography, movie-making)</option>";
	}*/
	else{}
	sInnerHTML +="</select>";
	//alert(document.getElementById('clb_em').value);
	objContainer.innerHTML = sInnerHTML;
}

/*function checkValidation(){
	flag = true;	
	if(document.getElementById('mEntCatId').value==''){
		alert("Please select the Event Category");
		flag = false;
		return false;
	}
	if(document.getElementById('sEntCat').value==''){
		alert("Please select the Event Name");
		flag = false;
		return false;
	}
}
function checkValidation1()
{
	flag= true;
	if(document.getElementById('pn_1').value==''){
		alert("Please enter the Participant Name");
		flag = false;
		return false;
	}
	if(document.getElementById('in_1').value==''){
		alert("Please enter the Institute Name");
		flag = false;
		return false;
	}
	if(document.getElementById('sm_1').value==''){
		alert("Please enter the Stream of Management");
		flag = false;
		return false;
	}
	if(document.getElementById('rn_1').value==''){
		alert("Please enter the Roll No.");
		flag = false;
		return false;
	}
	if(document.getElementById('cn_1').value==''){
		alert("Please enter the Contact No.");
		flag = false;
		return false;
	} else {
		var filter = /^(\d)+$/;
		var number = document.getElementById('cn_1').value;
		if(!filter.test(number)){
			alert("Please enter the only integers");
			flag = false;
			return false;
		}
	}
	if(document.getElementById('em_1').value==''){
		alert("Please enter the Email Id.");
		flag = false;
		return false;
	} else {
		var filter = /^((([a-z]|[A-Z]|[0-9]|\-|_)+(\.([a-z]|[A-Z]|[0-9]|\-|_)+)*)@((((([a-z]|[A-Z]|[0-9])([a-z]|[A-Z]|[0-9]|\-){0,61}([a-z]|[A-Z]|[0-9])\.))*([a-z]|[A-Z]|[0-9])([a-z]|[A-Z]|[0-9]|\-){0,61}([a-z]|[A-Z]|[0-9])\.)[\w]{2,4}|(((([0-9]){1,3}\.){3}([0-9]){1,3}))|(\[((([0-9]){1,3}\.){3}([0-9]){1,3})\])))$/
		var email = document.getElementById('em_1').value;
		if(!filter.test(email)){
			alert("Please enter the valid Email Id.");
			flag = false;
			return false;
		}
	}
	
	if(document.getElementById('check').value=='1')
	{
	if(document.getElementById('pn_2').value==''){
		alert("Please enter the Participant Name");
		flag = false;
		return false;
	}
	if(document.getElementById('in_2').value==''){
		alert("Please enter the Institute Name");
		flag = false;
		return false;
	}
	if(document.getElementById('sm_2').value==''){
		alert("Please enter the Stream of Management");
		flag = false;
		return false;
	}
	if(document.getElementById('rn_2').value==''){
		alert("Please enter the Roll No.");
		flag = false;
		return false;
	}
	if(document.getElementById('cn_2').value==''){
		alert("Please enter the Contact No.");
		flag = false;
		return false;
	} else {
		var filter = /^(\d)+$/;
		var number = document.getElementById('cn_2').value;
		if(!filter.test(number)){
			alert("Please enter the only integers");
			flag = false;
			return false;
		}
	}
	if(document.getElementById('em_2').value==''){
		alert("Please enter the Email Id.");
		flag = false;
		return false;
	} else {
		var filter = /^((([a-z]|[A-Z]|[0-9]|\-|_)+(\.([a-z]|[A-Z]|[0-9]|\-|_)+)*)@((((([a-z]|[A-Z]|[0-9])([a-z]|[A-Z]|[0-9]|\-){0,61}([a-z]|[A-Z]|[0-9])\.))*([a-z]|[A-Z]|[0-9])([a-z]|[A-Z]|[0-9]|\-){0,61}([a-z]|[A-Z]|[0-9])\.)[\w]{2,4}|(((([0-9]){1,3}\.){3}([0-9]){1,3}))|(\[((([0-9]){1,3}\.){3}([0-9]){1,3})\])))$/
		var email = document.getElementById('em_2').value;
		if(!filter.test(email)){
			alert("Please enter the valid Email Id.");
			flag = false;
			return false;
		}
	}
	}
	
	
	if(document.getElementById('pn_3').value==''){
		alert("Please enter the Participant Name");
		flag = false;
		return false;
	}
	if(document.getElementById('in_3').value==''){
		alert("Please enter the Institute Name");
		flag = false;
		return false;
	}
	if(document.getElementById('sm_3').value==''){
		alert("Please enter the Stream of Management");
		flag = false;
		return false;
	}
	if(document.getElementById('rn_3').value==''){
		alert("Please enter the Roll No.");
		flag = false;
		return false;
	}
	if(document.getElementById('cn_3').value==''){
		alert("Please enter the Contact No.");
		flag = false;
		return false;
	} else {
		var filter = /^(\d)+$/;
		var number = document.getElementById('cn_3').value;
		if(!filter.test(number)){
			alert("Please enter the only integers");
			flag = false;
			return false;
		}
	}
	if(document.getElementById('em_3').value==''){
		alert("Please enter the Email Id.");
		flag = false;
		return false;
	} else {
		var filter = /^((([a-z]|[A-Z]|[0-9]|\-|_)+(\.([a-z]|[A-Z]|[0-9]|\-|_)+)*)@((((([a-z]|[A-Z]|[0-9])([a-z]|[A-Z]|[0-9]|\-){0,61}([a-z]|[A-Z]|[0-9])\.))*([a-z]|[A-Z]|[0-9])([a-z]|[A-Z]|[0-9]|\-){0,61}([a-z]|[A-Z]|[0-9])\.)[\w]{2,4}|(((([0-9]){1,3}\.){3}([0-9]){1,3}))|(\[((([0-9]){1,3}\.){3}([0-9]){1,3})\])))$/
		var email = document.getElementById('em_3').value;
		if(!filter.test(email)){
			alert("Please enter the valid Email Id.");
			flag = false;
			return false;
		}
	}
	
	if(flag){
		document.reg.submit();
	} else {
		return false;
	}	
}*/


function openWin(){
	window.open("map.html", "mapWin", "status=0, toolbar=0, width=352, height=431, left=430, top=200");
}
function openForm(m, s){
	window.location ="page.php?tab=0&page=register&mCat="+m+"&sCat="+s;
	//window.open(url, "frmWin", "status=0, toolbar=0, width=550, height=600, left=430, top=200");	
}
