var numer = /^[0-9]+$/;
var reg = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;
/*--------------------------------End of Global Variable---------------------------*/
var ddaccordion={
	
	contentclassname:{}, //object to store corresponding contentclass name based on headerclass

	expandone:function(headerclass, selected){ //PUBLIC function to expand a particular header
		this.toggleone(headerclass, selected, "expand")
	},

	collapseone:function(headerclass, selected){ //PUBLIC function to collapse a particular header
		this.toggleone(headerclass, selected, "collapse")
	},

	expandall:function(headerclass){ //PUBLIC function to expand all headers based on their shared CSS classname
		var $=jQuery
		var $headers=$('.'+headerclass)
		$('.'+this.contentclassname[headerclass]+':hidden').each(function(){
			$headers.eq(parseInt($(this).attr('contentindex'))).trigger("evt_accordion")
		})
	},

	collapseall:function(headerclass){ //PUBLIC function to collapse all headers based on their shared CSS classname
		var $=jQuery
		var $headers=$('.'+headerclass)
		$('.'+this.contentclassname[headerclass]+':visible').each(function(){
			$headers.eq(parseInt($(this).attr('contentindex'))).trigger("evt_accordion")
		})
	},

	toggleone:function(headerclass, selected, optstate){ //PUBLIC function to expand/ collapse a particular header
		var $=jQuery
		var $targetHeader=$('.'+headerclass).eq(selected)
		var $subcontent=$('.'+this.contentclassname[headerclass]).eq(selected)
		if (typeof optstate=="undefined" || optstate=="expand" && $subcontent.is(":hidden") || optstate=="collapse" && $subcontent.is(":visible"))
			$targetHeader.trigger("evt_accordion")
	},

	expandit:function($targetHeader, $targetContent, config, useractivated, directclick){
		this.transformHeader($targetHeader, config, "expand")
		$targetContent.slideDown(config.animatespeed, function(){
			config.onopenclose($targetHeader.get(0), parseInt($targetHeader.attr('headerindex')), $targetContent.css('display'), useractivated)
			if (config.postreveal=="gotourl" && directclick){ //if revealtype is "Go to Header URL upon click", and this is a direct click on the header
				var targetLink=($targetHeader.is("a"))? $targetHeader.get(0) : $targetHeader.find('a:eq(0)').get(0)
				if (targetLink) //if this header is a link
					setTimeout(function(){location=targetLink.href}, 200) //ignore link target, as window.open(targetLink, targetLink.target) doesn't work in FF if popup blocker enabled
			}
		})
	},

	collapseit:function($targetHeader, $targetContent, config, isuseractivated){
		this.transformHeader($targetHeader, config, "collapse")
		$targetContent.slideUp(config.animatespeed, function(){config.onopenclose($targetHeader.get(0), parseInt($targetHeader.attr('headerindex')), $targetContent.css('display'), isuseractivated)})
	},

	transformHeader:function($targetHeader, config, state){
		$targetHeader.addClass((state=="expand")? config.cssclass.expand : config.cssclass.collapse) //alternate btw "expand" and "collapse" CSS classes
		.removeClass((state=="expand")? config.cssclass.collapse : config.cssclass.expand)
		if (config.htmlsetting.location=='src'){ //Change header image (assuming header is an image)?
			$targetHeader=($targetHeader.is("img"))? $targetHeader : $targetHeader.find('img').eq(0) //Set target to either header itself, or first image within header
			$targetHeader.attr('src', (state=="expand")? config.htmlsetting.expand : config.htmlsetting.collapse) //change header image
		}
		else if (config.htmlsetting.location=="prefix") //if change "prefix" HTML, locate dynamically added ".accordprefix" span tag and change it
			$targetHeader.find('.accordprefix').html((state=="expand")? config.htmlsetting.expand : config.htmlsetting.collapse)
		else if (config.htmlsetting.location=="suffix")
			$targetHeader.find('.accordsuffix').html((state=="expand")? config.htmlsetting.expand : config.htmlsetting.collapse)
	},

	urlparamselect:function(headerclass){
		var result=window.location.search.match(new RegExp(headerclass+"=((\\d+)(,(\\d+))*)", "i")) //check for "?headerclass=2,3,4" in URL
		if (result!=null)
			result=RegExp.$1.split(',')
		return result //returns null, [index], or [index1,index2,etc], where index are the desired selected header indices
	},

	getCookie:function(Name){ 
		var re=new RegExp(Name+"=[^;]+", "i") //construct RE to search for target name/value pair
		if (document.cookie.match(re)) //if cookie found
			return document.cookie.match(re)[0].split("=")[1] //return its value
		return null
	},

	setCookie:function(name, value){
		document.cookie = name + "=" + value + "; path=/"
	},

	init:function(config){
	document.write('<style type="text/css">\n')
	document.write('.'+config.contentclass+'{display: none}\n') //generate CSS to hide contents
	document.write('<\/style>')
	jQuery(document).ready(function($){
		ddaccordion.urlparamselect(config.headerclass)
		var persistedheaders=ddaccordion.getCookie(config.headerclass)
		ddaccordion.contentclassname[config.headerclass]=config.contentclass //remember contentclass name based on headerclass
		config.cssclass={collapse: config.toggleclass[0], expand: config.toggleclass[1]} //store expand and contract CSS classes as object properties
		config.revealtype=config.revealtype || "click"
		config.revealtype=config.revealtype.replace(/mouseover/i, "mouseenter")
		if (config.revealtype=="clickgo"){
			config.postreveal="gotourl" //remember added action
			config.revealtype="click" //overwrite revealtype to "click" keyword
		}
		if (typeof config.togglehtml=="undefined")
			config.htmlsetting={location: "none"}
		else
			config.htmlsetting={location: config.togglehtml[0], collapse: config.togglehtml[1], expand: config.togglehtml[2]} //store HTML settings as object properties
		config.oninit=(typeof config.oninit=="undefined")? function(){} : config.oninit //attach custom "oninit" event handler
		config.onopenclose=(typeof config.onopenclose=="undefined")? function(){} : config.onopenclose //attach custom "onopenclose" event handler
		var lastexpanded={} //object to hold reference to last expanded header and content (jquery objects)
		var expandedindices=ddaccordion.urlparamselect(config.headerclass) || ((config.persiststate && persistedheaders!=null)? persistedheaders : config.defaultexpanded)
		if (typeof expandedindices=='string') //test for string value (exception is config.defaultexpanded, which is an array)
			expandedindices=expandedindices.replace(/c/ig, '').split(',') //transform string value to an array (ie: "c1,c2,c3" becomes [1,2,3]
		var $subcontents=$('.'+config["contentclass"])
		if (expandedindices.length==1 && expandedindices[0]=="-1") //check for expandedindices value of [-1], indicating persistence is on and no content expanded
			expandedindices=[]
		if (config["collapseprev"] && expandedindices.length>1) //only allow one content open?
			expandedindices=[expandedindices.pop()] //return last array element as an array (for sake of jQuery.inArray())
		if (config["onemustopen"] && expandedindices.length==0) //if at least one content should be open at all times and none are, open 1st header
			expandedindices=[0]
		$('.'+config["headerclass"]).each(function(index){ //loop through all headers
			if (/(prefix)|(suffix)/i.test(config.htmlsetting.location) && $(this).html()!=""){ //add a SPAN element to header depending on user setting and if header is a container tag
				$('<span class="accordprefix"></span>').prependTo(this)
				$('<span class="accordsuffix"></span>').appendTo(this)
			}
			$(this).attr('headerindex', index+'h') //store position of this header relative to its peers
			$subcontents.eq(index).attr('contentindex', index+'c') //store position of this content relative to its peers
			var $subcontent=$subcontents.eq(index)
			var needle=(typeof expandedindices[0]=="number")? index : index+'' //check for data type within expandedindices array- index should match that type
			if (jQuery.inArray(needle, expandedindices)!=-1){ //check for headers that should be expanded automatically (convert index to string first)
				if (config.animatedefault==false)
					$subcontent.show()
				ddaccordion.expandit($(this), $subcontent, config, false) //Last param sets 'isuseractivated' parameter
				lastexpanded={$header:$(this), $content:$subcontent}
			}  //end check
			else{
				$subcontent.hide()
				config.onopenclose($(this).get(0), parseInt($(this).attr('headerindex')), $subcontent.css('display'), false) //Last Boolean value sets 'isuseractivated' parameter
				ddaccordion.transformHeader($(this), config, "collapse")
			}
		})
		$('.'+config["headerclass"]).bind("evt_accordion", function(e, isdirectclick){ //assign custom event handler that expands/ contacts a header
				var $subcontent=$subcontents.eq(parseInt($(this).attr('headerindex'))) //get subcontent that should be expanded/collapsed
				if ($subcontent.css('display')=="none"){
					ddaccordion.expandit($(this), $subcontent, config, true, isdirectclick) //2nd last param sets 'isuseractivated' parameter
					if (config["collapseprev"] && lastexpanded.$header && $(this).get(0)!=lastexpanded.$header.get(0)){ //collapse previous content?
						ddaccordion.collapseit(lastexpanded.$header, lastexpanded.$content, config, true) //Last Boolean value sets 'isuseractivated' parameter
					}
					lastexpanded={$header:$(this), $content:$subcontent}
				}
				else if (!config["onemustopen"] || config["onemustopen"] && lastexpanded.$header && $(this).get(0)!=lastexpanded.$header.get(0)){
					ddaccordion.collapseit($(this), $subcontent, config, true) //Last Boolean value sets 'isuseractivated' parameter
				}
 		})
		$('.'+config["headerclass"]).bind(config.revealtype, function(){
			if (config.revealtype=="mouseenter"){
				clearTimeout(config.revealdelay)
				var headerindex=parseInt($(this).attr("headerindex"))
				config.revealdelay=setTimeout(function(){ddaccordion.expandone(config["headerclass"], headerindex)}, config.mouseoverdelay || 0)
			}
			else{
				$(this).trigger("evt_accordion", [true])
				return false //cancel default click behavior
			}
		})
		$('.'+config["headerclass"]).bind("mouseleave", function(){
			clearTimeout(config.revealdelay)
		})
		config.oninit($('.'+config["headerclass"]).get(), expandedindices)
		$(window).bind('unload', function(){ //clean up and persist on page unload
			$('.'+config["headerclass"]).unbind()
			var expandedindices=[]
			$('.'+config["contentclass"]+":visible").each(function(index){ //get indices of expanded headers
				expandedindices.push($(this).attr('contentindex'))
			})
			if (config.persiststate==true && $('.'+config["headerclass"]).length>0){ //persist state?
				expandedindices=(expandedindices.length==0)? '-1c' : expandedindices //No contents expanded, indicate that with dummy '-1c' value?
				ddaccordion.setCookie(config.headerclass, expandedindices)
			}
		})
	})
	}
}
ddaccordion.init({
	headerclass: "submenuheader",//Shared CSS class name of headers group	
	contentclass: "submenu", //Shared CSS class name of contents group
	revealtype: "mouseover", //Reveal content when user clicks or onmouseover the header? Valid value: "click", "clickgo", or "mouseover"
	mouseoverdelay: 200, //if revealtype="mouseover", set delay in milliseconds before header expands onMouseover
	collapseprev: true, //Collapse previous content (so only one open at any time)? true/false 
	defaultexpanded: [], //index of content(s) open by default [index1, index2, etc] [] denotes no content
	onemustopen: false, //Specify whether at least one header should be open always (so never all headers closed)
	animatedefault: false, //Should contents open by default be animated into view?
	persiststate: false, //persist state of opened contents within browser session?
	toggleclass: ["", ""], //Two CSS classes to be applied to the header when it's collapsed and expanded, respectively ["class1", "class2"]
	animatespeed: 200, //speed of animation: integer in milliseconds (ie: 200), or keywords "fast", "normal", or "slow"
	oninit:function(headers, expandedindices){ //custom code to run when headers have initalized
		//do nothing
	},
	onopenclose:function(header, index, state, isuseractivated){ //custom code to run whenever a header is opened or closed
		//do nothing
	}
})
/*---------------------------Menu Setting Ends------------------------------*/
var linkArr='iifm.co.in/home.html=Home*iifm.co.in/index.html=About Us*iifm.co.in/press-room.php=Press Room*iifm.co.in/Contact.html=Contact Us*iifm.co.in/CFP_CM.html=CFP<sup>CM</sup>*iifm.co.in/CFA_leaflet.html=CFA<sup>&reg;</sup>*iifm.co.in/Mytrade.html=myTrade*iifm.co.in/myassurance.php=myAssurance'.split('*');
var hyperlink=new Array();
function bottomlink()
{
for(var i=0; i<linkArr.length; i++){
hyperlink[i]=new Object;
var linkPair=linkArr[i].split('=');
hyperlink[i].url='http://www.'+linkPair[0];
hyperlink[i].text=linkPair[1];
document.write('<a href="'+hyperlink[i].url+'" style="text-decoration:none; color:#0084c1; font-size:12px">'+hyperlink[i].text+'</a>&nbsp;&nbsp;|&nbsp;&nbsp;');
} 
}
var linkArrtwo='iifm.co.in/franchisees.php=Franchisees*iifm.co.in/franchisee-form.php=Franchisees Form*indiaiifm.blogspot.com=Blog*facebook.com/people/Iifm-Dossier/100000966864853=Facebook*twitter.com/IIFMTweet=Twitter*iifm.co.in/right-to-education.php=Right to Education*iifm.co.in/team-iifm.php=Our Team*iifm.co.in/faculty.php=Faculty'.split('*');
var hyperlinktwo=new Array();
function secondlink()
{
for(var i=0; i<linkArrtwo.length; i++){
hyperlinktwo[i]=new Object;
var linkPair=linkArrtwo[i].split('=');
hyperlinktwo[i].url='http://www.'+linkPair[0];
hyperlinktwo[i].text=linkPair[1];
document.write('<a href="'+hyperlinktwo[i].url+'" style="text-decoration:none; color:#0084c1; font-size:12px">'+hyperlinktwo[i].text+'</a>&nbsp;&nbsp;|&nbsp;&nbsp;');
} 
}
/*-----------------------------------------------Bottom Links Ends---------------------------------------*/
function Validateitr()
{
	var yintr = document.home_page_form.mobile.value;
	var addressintr = document.home_page_form.email.value;
    if ((document.home_page_form.name.value == '') || (document.home_page_form.name.value == 'First & Last Name'))
    {
        alert('Please fill you full name!');
        return false;
    }
	if (yintr.length<=9) 
    {
        alert('Mobile number cannot be less than 10 numbers!');
        return false;
    }
	if (numer.test(yintr) == false)
	{
        alert('Mobile numbers should contain only numbers!');
        return false;
	}
	if(reg.test(addressintr) == false) 
    {
        alert('Please fill in your email-Id correctly!');
        return false;
    }
	if (document.home_page_form.course.value == '') 
    {
        alert('Please select course type!');
        return false;
    }
	if ((document.home_page_form.code.value == '')  ||  (document.home_page_form.code.value == 'Conformation Code'))
    {
        alert('Please fill the verification code!');
        return false;
    }
	if (document.home_page_form.details.value == '') 
    {
		alert('Please give some information that will help us to serve better!');
        return false;
    }
return true;
}
function Validatewm()
{
	var address = document.wm_form.wmemail.value;
	if ((document.wm_form.wmname.value == '') || (document.wm_form.wmname.value == 'Your First and last name'))
    {
		alert('Please fill your name correctly!');
        return false;
    }
	if(reg.test(address) == false) 
    {
        alert('Please fill in your email-Id correctly!');
        return false;
    }
}
/*--------------------------------------End of Introduction Validate-------------------------------------*/
function Validategc()
{
	var gy = document.gcform.Gmobile.value;
	var gaddress = document.gcform.Gemail.value;
    if ((document.gcform.Gname.value == '') || (document.gcform.Gname.value == 'First & Last Name'))
    {
        alert('Please Fill you Name!');
        return false;
    }
	if(reg.test(gaddress) == false) 
    {
        alert('Please fill in your Email ID Correctly!');
        return false;
    }
	if (gy.length<=9) 
    {
        alert('Mobile Number Cannot be less than 10 Numbers!');
        return false;
    }
	if (numer.test(gy) == false)
	{
		alert('Mobile numbers should contain only numbers!');
        return false;
	}
	if (document.gcform.Glocation.value == '')
    {
        alert('Please select your location!');
        return false;
    }
	if (document.gcform.course.value == '')
    {
        alert('Please select your course!');
        return false;
    }
	if ((document.gcform.code.value == '') || (document.gcform.code.value == 'Write the code'))
    {
        alert('Please write the code!');
        return false;
    }
return true;
}
/*------------------------------------------Global Valid Ends--------------------------------------*/
$(document).ready(function(){
$('input:text,password,textarea,select').css({paddingTop:"5px" ,paddingBottom:"5px"});
$('input:text,password,textarea,select').focus(function(){
$(this).css({background:"#acd401", fontStyle:"normal"});
var newValue = $(this).val();
if($(this).val() == this.defaultValue){$(this).attr('value','');}
else{$(this).val(newValue);}
});
$('input:text,password,textarea,select').blur(function(){
$(this).css({color:"#0084C1",background:"#fff", border:"1px solid #0084C1", fontStyle:"italic"});
var newValue = $(this).val();
if($(this).val() == ''){
$(this).attr('value',this.defaultValue);
} else {
$(this).val(newValue);
$(this).css({fontStyle:"normal"});
}
});
});
/*-----------------------------------------Textarea Setting Ends------------------------------------*/
function Validateff()
{
    if (document.registration_form.title.value == '')
    {
        alert('Please fill in your Title!');
        return false;
    }
	if ((document.registration_form.fname.value == '') || (document.registration_form.fname.value == 'Your First Name'))
    {
        alert('Please fill in your first name!');
        return false;
    }
	if ((document.registration_form.lname.value == '') || (document.registration_form.lname.value == 'Your Last Name'))
    {
        alert('Please fill in your last name!');
        return false;
    }
	if ((document.registration_form.std.value == '') || (document.registration_form.std.value == 'Your City STD Code'))
    {
        alert('Please fill in your STD Code!');
        return false;
    }
	if ((document.registration_form.phnumber.value == '') || (document.registration_form.phnumber.value == 'Your Landline Number'))
    {
        alert('Please fill in your Phone Number!');
        return false;
    }
	if ((document.registration_form.mnumber.value == '') || (document.registration_form.mnumber.value == 'Your Mobile Number'))
    {
        alert('Mobile Number Cannot be less than 10 Numbers!');
        return false;
    }
	if ((document.registration_form.email.value == '') || (document.registration_form.email.value == 'Your Email Id'))
    {
        alert('Please fill in your Email ID!');
        return false;
    }
	if ((document.registration_form.address.value == '') || (document.registration_form.address.value == 'Street Name'))
    {
        alert('Please fill in your Address!');
        return false;
    }
	if ((document.registration_form.city.value == '') || (document.registration_form.city.value == 'Your City'))
    {
        alert('Please fill in your City Name!');
        return false;
    }
	if ((document.registration_form.zcode.value == '') || (document.registration_form.zcode.value == 'City Zip Code'))
    {
        alert('Please fill in your Zip Code!');
        return false;
    }
	if ((document.registration_form.state.value == '') || (document.registration_form.state.value == 'State'))
    {
        alert('Please fill in your State Name!');
        return false;
    }
	if ((document.registration_form.country.value == '') || (document.registration_form.country.value == 'Country'))
    {
        alert('Please fill in your Country Name!');
        return false;
    }
	if (document.registration_form.qualification.value == '') 
    {
        alert('Please fill in your Qualification!');
        return false;
    }
	if (document.registration_form.hqualification.value == '') 
    {
        alert('Please fill in your Higher Qualification!');
        return false;
    }
	if ((document.registration_form.Icity.value == '') || (document.registration_form.Icity.value == 'Franchisee City'))
    {
        alert('Please fill in your City Of Interest!');
        return false;
    }
	if ((document.registration_form.Istate.value == '') || (document.registration_form.Istate.value == 'Franchisee State'))
    {
        alert('Please fill in your State Of Interest!');
        return false;
    }
	if ((document.registration_form.Icountry.value == '') || (document.registration_form.Icountry.value == 'Franchisee Country'))
    {
        alert('Please fill in your Country Of Interest!');
        return false;
    }
return true;
}
/*---------------------------------------Franchisee Valid End-------------------------------------*/
function Validaterte()
{
	var addressrte = document.form.email.value;
	var strlen = document.form.phone.value;
	var strlenstd = document.form.Contact.value;
	var codet = document.form.Contact.value;
	var costd = document.form.stdContact.value;
    if ((document.form.Fullname.value == '') || (document.form.Fullname.value == 'First & Last Name'))
    {
		alert('Please fill you full name!');
        return false;
    }
	if ((document.form.fname.value == '') || (document.form.fname.value == "Your Father's Name"))
    {
		alert('Please fill you father name!');
        return false;
    }
	if ((document.form.mname.value == '') || (document.form.mname.value == "Your Mother's Name"))
    {
		alert('Please fill you mother name!');
        return false;
    }
	if ((document.form.Occupation.value == '') || (document.form.Occupation.value == 'Enter Your Occupation'))
    {
		alert('Please fill you occupation!');
        return false;
    }
	if ((document.form.focc.value == '') || (document.form.focc.value == "Father's Occupation"))
    {
		alert('Please fill you father occupation!');
        return false;
    }
	if ((document.form.mocc.value == '') || (document.form.mocc.value == "Mother's Occupation"))
    {
		alert('Please fill you mother occupation!');
        return false;
    }
	if ((document.form.AFI.value == '') || (document.form.AFI.value == 'Your Family Income'))
    {
		alert('Please fill you annual family income!');
        return false;
    }
	if (document.form.course.value == '')
    {
		alert('Please select the course you want to apply for!');
        return false;
    }
	if(numer.test(codet) == false) 
    {
		alert('Contact number should be atleast of 5 digit!');
        return false;
    }
	if(strlenstd.length<5)
	{
		alert('Contact number should be atleast of 5 digit!');
		return false;
	}
	if(numer.test(costd) == false) 
    {
		alert('Please enter numeric only in STD contact numbers!');
        return false;
    }
	if ((document.form.address.value == '') ||(document.form.address.value == 'Complete Address'))
    {
		alert('Please fill your address!');
        return false;
    }
	if(strlen.length<10)
	{
		alert('Enter 10 digit mobile number!');
		return false;
	}
	if(numer.test(strlen) == false) 
    {
		alert('Please enter 10 digit numeric only in mobile numbers!');
        return false;
    }
	if(reg.test(addressrte) == false) 
    {
		alert('Please fill in your email ID correctly!');
        return false;
    }
return true;
}
/*-------------------------------------------Right To Education End---------------------------------*/
function Validatect()
{
	var yct = document.ct_form.mobile.value;
	var addressct = document.ct_form.email.value;
    if (document.ct_form.title.value == '') 
    {
        alert('Please fill in your Title!');
        return false;
    }
	if ((document.ct_form.fname.value == '') || (document.ct_form.fname.value == 'Your First Name'))
    {
        alert('Please fill in your first name!');
        return false;
    }
	if ((document.ct_form.sname.value == '') || (document.ct_form.sname.value == 'Your Surname'))
    {
        alert('Please fill in your last name!');
        return false;
    }
	if ((document.ct_form.jtitle.value == '') || (document.ct_form.jtitle.value == 'Your Job Titile'))
    {
        alert('Please fill in your job title!');
        return false;
    }
	if ((document.ct_form.org.value == '') || (document.ct_form.org.value == 'Your Organization'))
    {
        alert('Please fill in your organization name!');
        return false;
    }
	if(numer.test(yct) == false) 
    {
		alert('Please enter 10 digit numeric only in mobile numbers!');
        return false;
    }
	if (yct.length<=9) 
    {
        alert('Mobile Number Cannot be less than 10 Numbers!');
        return false;
    }
	if(reg.test(addressct) == false) 
    {
        alert('Please fill in your Email ID Correctly!');
        return false;
    }
	if (document.ct_form.country.value == '')
    {
        alert('Please Select your country name!');
        return false;
    }
	if ((document.ct_form.PIA.value == '') || (document.ct_form.PIA.value == 'Planning & Investment Analysis'))
    {
        alert('Please Select your Planning & Insvement Analysis Field!');
        return false;
    }
	if (document.ct_form.CM.value == '') 
    {
        alert('Please Select Capital Markets Field!');
        return false;
    }
	if ((document.ct_form.FM.value == '') || (document.ct_form.FM.value == 'Financial Management'))
    {
        alert('Please Fill financial management field!');
        return false;
    }
	if ((document.ct_form.FMod.value == '') || (document.ct_form.FMod.value == 'Financial Modeling'))
    {
        alert('Please Fill financial modeling field!');
        return false;
    }
	if (document.ct_form.CFA.value == '') 
    {
        alert('Please Select Any Corporate Finance & Accounting Field!');
        return false;
    }
	if ((document.ct_form.PD.value == '') || (document.ct_form.PD.value == 'Date Preference'))
    {
        alert('Please fill prefered dates field!');
        return false;
    }
	if ((document.ct_form.NOA.value == '') || (document.ct_form.NOA.value == 'No Of People Attending'))
    {
        alert('Please Fill Number of Atteendies Field!');
        return false;
    }
	if (document.ct_form.BDAP.value == '') 
    {
        alert('Please Fill Brief Description of Atteendies Profile Field!');
        return false;
    }
return true;
}
/*--------------------------Corporate Training Ends---------------------------*/
function Validateinf()
{
	var yin = document.inhouse_form.mobile.value;
	var addressin = document.inhouse_form.email.value;
    if (document.inhouse_form.title.value == '') 
    {
        alert('Please select your title!');
        return false;
    }
	if ((document.inhouse_form.fname.value == '') || (document.inhouse_form.fname.value == 'Your First Name'))
    {
        alert('Please fill in your first name!');
        return false;
    }
	if ((document.inhouse_form.sname.value == '') || (document.inhouse_form.sname.value == 'Your Surname'))
    {
        alert('Please fill in your last name!');
        return false;
    }
	if ((document.inhouse_form.jtitle.value == '') || (document.inhouse_form.jtitle.value == 'Your job Title'))
    {
        alert('Please fill in your job title!');
        return false;
    }
	if ((document.inhouse_form.org.value == '') || (document.inhouse_form.org.value == 'Your Organization'))
    {
        alert('Please fill in your organization name!');
        return false;
    }
	if (document.inhouse_form.country.value == '') 
    {
        alert('Please Select your country Name!');
        return false;
    }
	if (yin.length<=9) 
    {
        alert('Mobile number cannot be less than 10 numbers!');
        return false;
    }
	if (numer.test(yin) == false)
	{
		alert('Mobile numbers should contain only numbers!');
        return false;
	}
	if(reg.test(addressin) == false) 
    {
        alert('Please fill in your mail-ID correctly!');
        return false;
    }
	if (document.inhouse_form.TOP.value == '')
    {
        alert('Please select your type of Program!');
        return false;
    }
	if (document.inhouse_form.Joint_Prg.value == '') 
    {
        alert('Please select joint program field!');
        return false;
    }
	if (document.inhouse_form.outsource.value == '') 
    {
        alert('Please fill complete outsourced option field!');
        return false;
    }
	if (document.inhouse_form.Trainingplace.value == '') 
    {
        alert('Please fill your place of training field!');
        return false;
    }
	if (document.inhouse_form.POA.value == '') 
    {
        alert('Please select any profile of atteendies section!');
        return false;
    }
	if (document.inhouse_form.details.value == '')
    {
        alert('Please fill in any details that will help usto serve better!');
        return false;
    }
	if (document.inhouse_form.knowIIFM.value == '')
	{
        alert('Let us know from where did you come to know about IIFM');
        return false;
    }
	if ((document.inhouse_form.knowIIFM.value == 'others') && ((document.inhouse_form.othertxt.value == '') || (document.inhouse_form.othertxt.value == 'From where?')))
	{
        alert('Let us know from where did you come to know about IIFM');
        return false;
    }
return true;
}
function infoiht()
{
if (document.inhouse_form.knowIIFM.value == '') 
    {
        document.inhouse_form.othertxt.style.display='none';
		alert('Let us know from where did you come to know about IIFM');
        return false;
    }
	if (document.inhouse_form.knowIIFM.value == 'others') 
    {
        document.inhouse_form.othertxt.style.display='';
        return false;
    }
	if ((document.inhouse_form.knowIIFM.value == 'newspaper') || (document.inhouse_form.knowIIFM.value == 'television') || (document.inhouse_form.knowIIFM.value == 'friend'))
    {
        document.inhouse_form.othertxt.style.display='none';
        return false;
    }
return true;
}
/*-------------------------------------------In-House Form End-----------------------------------*/
function Validate()
{
	var yff = document.feedback_form.mobile.value;
	var addressff = document.feedback_form.email.value;
	
	if ((document.feedback_form.fname.value == '') || (document.feedback_form.fname.value == 'Student Full Name'))
    {
		 alert('Please Fill you Name!');
        return false;
    }
	if (yff.length<=9) 
    {
		alert('Mobile Number Cannot be less than 10 Numbers!');
        return false;
    }
	if (numer.test(yff) == false)
	{
		alert('Mobile numbers should contain only numbers!');
        return false;
	}
	if(reg.test(addressff) == false) 
    {
		alert('Please fill in your Email ID Correctly!');
        return false;
    }
	if (document.feedback_form.course.value == '')
    {
		alert('Please select course choosen for query!');
        return false;
    }
	if (document.feedback_form.attended.value == '')
    {
		alert('Please say was your query attended by IIFM!');
        return false;
    }
	if (document.feedback_form.satisfied.value == '')
    {
		alert('Please say are you satisfied with the query information!');
        return false;
    }
}
/*------------------------------------------Feedback Valdi---------------------------------*/
function fadein(div_id) {$('#'+div_id).fadeIn(1500);}
function fadeout(div_id) {$('#'+div_id).fadeOut(1500);}
/*-------------------------------------------Info Display-------------------------------------*/
function Validatemtc()
{
	var ymtc = document.mytrade_counselling_form.mobile.value;
	var addressmtc = document.mytrade_counselling_form.email.value;
    if ((document.mytrade_counselling_form.name.value == '') || (document.mytrade_counselling_form.name.value == 'First & Last Name'))
    {
		alert('Please fill you full name!');
        return false;
    }
	if (ymtc.length<=9) 
    {
		alert('Mobile number cannot be less than 10 numbers!');
        return false;
    }
	if (numer.test(ymtc) == false)
	{
		alert('Mobile numbers should contain only numbers!');
        return false;
	}
	if(reg.test(addressmtc) == false) 
    {
		alert('Please fill in your email-ID correctly!');
        return false;
    }
	if ((document.mytrade_counselling_form.details.value == '') || (document.mytrade_counselling_form.details.value == 'Example: Student / Working / Finance Background / Non-Finance'))
    {
		alert('Please give some information that will help us to serve better!');
        return false;
    }
return true;
}
/*---------------------------------------------------------myTrade Counselling End-------------------------------------------*/
var selected = new Array(3);
function getMovie() {
if ((selected[1] == "X") &&  (selected[2] == "X")) {
alert ("All options have now been selected");
return false;
}
// Generate a Random Number
for (var i = 0; i<1; i++) {
var randomNumber = Math.ceil(Math.random()*2);  // 1-4 equal probability
if (selected[randomNumber] == "X") {  // if already selected do it again and generate another random number
i--;
}
}
selected[randomNumber] = "X";  // mark as selected
// Select a swf and execute the corresponding function
if (randomNumber == 1) {movie1()}
else if (randomNumber == 2) {movie2()}
}
//Functions to write out the correct flash movie resource.
function movie1() {
document.write("<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=4,0,2,0\" width=\"660\" height=\"65\"><param name=movie value=\"http://www.iifm.co.in/myassurance-top.swf\"><param name=quality value=high><param name=\"wmode\" value=\"transparent\" /><embed src=\"http://www.iifm.co.in/myassurance-top.swf\" quality=high pluginspage=\"http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash\" type=\"application/x-shockwave-flash\" wmode=\"transparent\" width=\"660\" height=\"65\"></embed></object>");
}
function movie2() {
document.write("<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=4,0,2,0\" width=\"660\" height=\"65\"><param name=movie value=\"http://www.iifm.co.in/mytrade-top.swf\"><param name=quality value=high><param name=\"wmode\" value=\"transparent\" /><embed src=\"http://www.iifm.co.in/mytrade-top.swf\" quality=high pluginspage=\"http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash\" type=\"application/x-shockwave-flash\" wmode=\"transparent\" width=\"660\" height=\"65\"></embed></object>");
}
/*---------------------------------------------------Header Flash End--------------------------------------------*/
function menuwrite() {
document.write("<div class=\"subdiv1\"><div class=\"subdivtop\"><div class=\"pinboardm\"><div class=\"pinleft\"><img src=\"http://www.iifm.co.in/Images/Blue-pin.png\" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href=\"http://www.iifm.co.in\"><img src=\"http://www.iifm.co.in/Images/home.png\" height=\"30px\" width=\"30px\" style=\"margin:-5px; border:none;\" title=\"Introduction to IIFM\" alt=\"Introduction to IIFM\" /></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href=\"http://www.iifm.co.in/home.html\"><img src=\"http://www.iifm.co.in/Images/kmenuedit.png\" height=\"30px\" width=\"30px\" style=\"margin:-5px; border:none;\" title=\"IIFM Home Page\" alt=\"IIFM Home Page\"/></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href=\"http://www.iifm.co.in/Contact.html\"><img src=\"http://www.iifm.co.in/Images/contact-icon.png\" height=\"30px\" width=\"30px\" style=\"margin:-5px; border:none;\" title=\"IIFM Contact Section\" alt=\"IIFM Contact Section\"/></a></div><div class=\"pinright\"><img src=\"http://www.iifm.co.in/Images/Blue-pin.png\" /></div></div><div class=\"glossymenu\"><a class=\"menuitem submenuheader\">Retail</a><div class=\"submenu\"><ul><li><a href=\"http://www.iifm.co.in/tradenow\">Tradenow</a></li><li><a href=\"http://www.iifm.co.in/Mytrade.html\">MyTrade</a></li><li><a href=\"http://www.iifm.co.in/myassurance.php\">MyAssurance</a></li><li><a href=\"http://www.iifm.co.in/CFP_CM.html\">CFP<sup>CM</sup></a></li><li><a href=\"http://www.iifm.co.in/CFA_leaflet.html\" >CFA<sup>&reg;</sup></a></li></ul></div><a class=\"menuitem submenuheader\">Institution</a><div class=\"submenu\"><ul><li><a href=\"http://www.iifm.co.in/In-House-Training.php\">In-House Training</a></li><li><a href=\"http://www.iifm.co.in/C2C.php\">C2C Model</a></li><li><a href=\"http://www.iifm.co.in/customized-workshop.php\">Customized Workshop</a></li></ul></div><a class=\"menuitem submenuheader\">Corporate</a><div class=\"submenu\"><ul><li><a href=\"http://www.iifm.co.in/content-provider.php\">Content Provider</a></li><li><a href=\"http://www.iifm.co.in/corporate-synergies.php\">Corporate Synergy</a></li><li><a href=\"http://www.iifm.co.in/Corporate-training.php\">Corporate Training</a></li></ul></div><a class=\"menuitem submenuheader\">Case Studies</a><div class=\"submenu\"><ul><li><a href=\"http://www.iifm.co.in/institutional-case-studies.php\">Institution</a></li><li><a href=\"http://www.iifm.co.in/corporate-case-study.php\">Corporate</a></li></ul></div><a class=\"menuitem submenuheader\" href=\"http://www.iifm.co.in/index.html\">About Us</a><div class=\"submenu\"><ul><li><a href=\"http://www.iifm.co.in/home.html\">IIFM Dossier</a></li><li><a href=\"http://www.iifm.co.in/team-iifm.php\">Our Team</a></li><li><a href=\"http://www.iifm.co.in/faculty.php\">Faculty</a></li><li><a href=\"http://www.iifm.co.in/right-to-education.php\">Right to Education</a></li><li><a href=\"http://www.iifm.co.in/franchisees.php\">Franchisee</a></li><li><a href=\"http://www.iifm.co.in/franchisee-form.php\">Franchisee Form</a></li><li><a href=\"http://www.iifm.co.in/press-room.php\">Press Room</a></li></ul></div><a class=\"menuitem\" href=\"http://www.iifm.co.in/Contact.html\">Contact Us</a><a class=\"menuitem\" href=\"http://www.iifm.co.in/budget-2011.php\">Budget Snapshot 2011</a></div><div class=\"subdivmid\"><img src=\"Images/refresh.png\" /></div></div><div align=\"center\" style=\"padding-top:10px;\"><iframe src=\"http://www.facebook.com/plugins/likebox.php?href=http%3A%2F%2Fwww.facebook.com%2Fiifm.refreshingfinance&amp;width=200&amp;colorscheme=light&amp;show_faces=true&amp;stream=false&amp;header=true&amp;height=350\" scrolling=\"no\" frameborder=\"0\" style=\"border:none; overflow:hidden; width:200px; height:350px;\" allowTransparency=\"true\"></iframe></div></div>");	
}
function rightads() {
document.write("<td class=\"div2rightholder\"><table width=\"95%\"><tr><td class=\"rfc\"><div class=\"title2\">Refresh Finance Citizen (RFC)</div><br />Refresh Finance Citizen (RFC) is a finance conscious, community oriented go-getter, who not only wants to exude financial sense but also create a platform for others to understand the nuances of the green buck.<br /><br />What we provide is a platform for you to write your opinions, facts and learn from other’s experience and knowledge.<br /><br />What you need to do is simply write a 350-400 page report, essay, opinion sheet or let us just say anything that you want to share in the great field of finance and we would love to publish it (after it is verified by our team of researchers) with your name.<br /><br />The jury would decide the best article and would dedicate one complete micro-site to the winner every month. Well that’s just a way from our side to say THANK YOU.<br /><br />Let us share knowledge. Let us Refresh Finance.<br /><br />Team IIFM.<br /><br /><div class=\"title2\" align=\"center\">Watch out RFC coming soon.</div></td></tr><tr><td class=\"rfc\"><div class=\"title2\">Contact Us</div><table width=\"100%\"><form name=\"gcform\" method=\"post\" action=\"global.php\" onsubmit=\"return Validategc();\"><tr><td id=\"GN\">Name*:</td><td><input type=\"text\" class=\"textarea\" name=\"Gname\" id=\"Gname\" value=\"First & Last Name\"/></td></tr><tr><td id=\"GE\">Email id*:</td><td><input type=\"text\" class=\"textarea\" name=\"Gemail\" id=\"Gemail\" value=\"Email Address\"/></td></tr><tr><td id=\"GM\">Mobile*:</td><td><input type=\"text\" class=\"textarea\" name=\"Gmobile\" id=\"Gmobile\" value=\"Your Mobile Number\"/></td></tr><tr><td id=\"GL\">Location*:</td><td><select name=\"Glocation\" id=\"Glocation\" class=\"textarea\"><option value=\"\" selected=\"selected\">Select Location...</option><option value=\"Delhi\">Delhi</option><option value=\"Mumbai\">Mumbai</option><option value=\"Bangalore\">Bangalore</option><option value=\"Chennai\">Chennai</option><option value=\"Goa\">Goa</option><option value=\"Hyderabad\">Hyderabad</option><option value=\"Kolkata\">Kolkata</option><option value=\"Pune\">Pune</option><option value=\"Others\">Others</option></select></td></tr><tr><td id=\"GSC\">Course*:</td><td><select name=\"course\" id=\"course\" class=\"textarea\" style=\"width:100%;\"><option selected=\"selected\" value=\"\">Select Course....</option><option value=\"RFC\">RFC (Refresh Finance Citizen)</option><option value=\"mytrade\">myTrade</option><option value=\"CFA\">CFA (Chartered Financial Analyst)</option><option value=\"CFP\">CFP (Certified Financial Planner)</option><option value=\"BSE-IIFM\">BSE-IIFM Training</option><option value=\"CSTO\">CSTO</option></select></td></tr><tr><td id=\"GC\">Code*:</td><td><input type=\"text\" class=\"textarea\" name=\"code\" id=\"code\" value=\"Write the code\"/><br /><img src=\"Images/code.jpg\" /></td></tr><tr><td>&nbsp;</td><td><input style=\"text-align:center; width:100%; background:#acd401; color:#fff; font-weight:bold; border:1px solid #000; font-size:13px;\" type=\"submit\" value=\"Submit Details\" /></td></tr></form></table></td></tr></table></td>");
}
/*-------------------------------------------------Menu Write End--------------------------------------------------------*/

/*-----------------------------------------End of C2C more content-----------------------------*/
function Validatemt()
{
	var ymt = document.mytrade_test_form.mobile.value;
	var addressmt = document.mytrade_test_form.email.value;
    if (document.mytrade_test_form.title.value == '') 
    {
        alert('Please select your title!');
        return false;
    }
	if ((document.mytrade_test_form.fname.value == '') || (document.mytrade_test_form.fname.value == 'Your First Name'))
    {
        alert('Please fill in your first name!');
        return false;
    }
	if ((document.mytrade_test_form.sname.value == '') || (document.mytrade_test_form.sname.value == 'Your Last Name'))
    {
        alert('Please fill in your last name!');
        return false;
    }
	if (document.mytrade_test_form.prof.value == '') 
    {
        alert('Please fill in your profession title!');
        return false;
    }
	if ((document.mytrade_test_form.org.value == '') || (document.mytrade_test_form.org.value == 'Your Organization/Institute'))
    {
        alert('Please fill in your organization / institution name!');
        return false;
    }
	if (ymt.length<=9) 
    {
        alert('Mobile Number Cannot be less than 10 Numbers!');
        return false;
    }
	if (numer.test(ymt) == false)
	{
		alert('Mobile numbers should contain only numbers!');
        return false;
	}
	if(reg.test(addressmt) == false) 
    {
        alert('Please fill in your email-ID correctly!');
        return false;
    }
	if (document.mytrade_test_form.country.value == '') 
    {
        alert('Please select your country name!');
        return false;
    }
	if (document.mytrade_test_form.MyTradeinfo.value == '') 
    {
        alert('Please select from where did you come to know about MyTrade!');
        return false;
    }
	if ((document.mytrade_test_form.MyTradeinfo.value == 'others') && ((document.mytrade_test_form.othertxt.value == '') || (document.mytrade_test_form.othertxt.value == 'From where?')))
	{
        alert('Please fill in from where you came to know about MyTrade');
        return false;
    }
return true;
}
function TAT()
{
if (document.mytrade_test_form.MyTradeinfo.value == '') 
    {
        document.mytrade_test_form.othertxt.style.display = 'none';
		alert('Please Select From where did u come to know about MyTrade!');
        return false;
    }
	if (document.mytrade_test_form.MyTradeinfo.value == 'others') 
    {
        document.mytrade_test_form.othertxt.style.display = '';
    }
	if ((document.mytrade_test_form.MyTradeinfo.value == 'newspaper') || (document.mytrade_test_form.MyTradeinfo.value == 'television') || (document.mytrade_test_form.MyTradeinfo.value == 'friend') || (document.mytrade_test_form.MyTradeinfo.value == 'Existing Student') || (document.mytrade_test_form.MyTradeinfo.value == 'Brochure') || (document.mytrade_test_form.MyTradeinfo.value == 'Website'))
    {
        document.mytrade_test_form.othertxt.style.display = 'none';
        return false;
    }
return true;
}
/*--------------------------------------------------Mytrade TAT End--------------------------------------------*/
function Validatemac()
{
	var ymac = document.myAssurance_counselling_form.mobile.value;
	var addressmac = document.myAssurance_counselling_form.email.value;
    if ((document.myAssurance_counselling_form.name.value == '') || (document.myAssurance_counselling_form.name.value == 'First & Last Name'))
    {
		alert('Please fill you full name!');
        return false;
    }
	if (ymac.length<=9) 
    {
		alert('Mobile number cannot be less than 10 numbers!');
        return false;
    }
	if (numer.test(ymac) == false)
	{
		alert('Mobile numbers should contain only numbers!');
        return false;
	}
	if(reg.test(addressmac) == false) 
    {
		alert('Please fill in your email-ID correctly!');
        return false;
    }
	if ((document.myAssurance_counselling_form.details.value == '') || (document.myAssurance_counselling_form.details.value == 'Example: Student / Working / Finance Background / Non-Finance'))
    {
		alert('Please give some information that will help us to serve better!');
        return false;
    }
return true;
}
/*------------------------------------------------------End of myAssurance Counselling---------------------------------------------*/
function Validatemat()
{
	var ymat = document.myassurance_test_form.mobile.value;
	var addressmat = document.myassurance_test_form.email.value;
    if (document.myassurance_test_form.title.value == '') 
    {
        alert('Please select your title!');
        return false;
    }
	if ((document.myassurance_test_form.fname.value == '') || (document.myassurance_test_form.fname.value == 'Your First Name'))
    {
        alert('Please fill in your first name!');
        return false;
    }
	if ((document.myassurance_test_form.sname.value == '') || (document.myassurance_test_form.sname.value == 'Your Last Name'))
    {
        alert('Please fill in your last name!');
        return false;
    }
	if (document.myassurance_test_form.prof.value == '') 
    {
        alert('Please fill in your profession title!');
        return false;
    }
	if ((document.myassurance_test_form.org.value == '') || (document.myassurance_test_form.org.value == 'Your Organization/Institute'))
    {
        alert('Please fill in your organization / institution name!');
        return false;
    }
	if (ymat.length<=9) 
    {
        alert('Mobile Number Cannot be less than 10 Numbers!');
        return false;
    }
	if (numer.test(ymat) == false)
	{
		alert('Mobile numbers should contain only numbers!');
        return false;
	}
	if(reg.test(addressmat) == false) 
    {
        alert('Please fill in your email-ID correctly!');
        return false;
    }
	if (document.myassurance_test_form.country.value == '') 
    {
        alert('Please select your country name!');
        return false;
    }
	if (document.myassurance_test_form.MyTradeinfo.value == '') 
    {
        alert('Please select from where did you come to know about MyTrade!');
        return false;
    }
	if ((document.myassurance_test_form.MyTradeinfo.value == 'others') && ((document.myassurance_test_form.othertxt.value == '') || (document.myassurance_test_form.othertxt.value == 'From where?')))
	{
        alert('Please fill in from where you came to know about MyTrade');
        return false;
    }
return true;
}
function tatch()
{
if (document.myassurance_test_form.MyTradeinfo.value == '') 
    {
        document.myassurance_test_form.othertxt.style.display='none';
		alert('Please Select From where did u come to know about MyAssurance!');
        return false;
    }
	if (document.myassurance_test_form.MyTradeinfo.value == 'others') 
    {
        document.myassurance_test_form.othertxt.style.display='';
        return false;
    }
	if ((document.myassurance_test_form.MyTradeinfo.value == 'newspaper') || (document.myassurance_test_form.MyTradeinfo.value == 'television') || (document.myassurance_test_form.MyTradeinfo.value == 'friend') || (document.myassurance_test_form.MyTradeinfo.value == 'Website') || (document.myassurance_test_form.MyTradeinfo.value == 'Brochure') || (document.myassurance_test_form.MyTradeinfo.value == 'Existing Student'))
    {
        document.myassurance_test_form.othertxt.style.display='none';
        return false;
    }
return true;
}
/*---------------------------------------------myAssurance AAPT End----------------------------------------------*/
