
function slidetabs(slideCont,slidetab){
	for(i=1; i<4; i++){
		document.getElementById('franslideCont'+i).style.display = 'none';
		document.getElementById(slideCont).style.display = 'block';
		document.getElementById('franslidetab'+i).className = 'off';
		document.getElementById(slidetab).className = 'on';
	}
}

function myPopUpWin(mylink,wname,usrw,usrh,iw,ih) {

	
	var iMyWidth;
	var iMyHeight;
	
	iMyWidth = (window.screen.width/2) - (iw);
	iMyHeight = (window.screen.height/2) - (ih);

	var mywin = window.open(mylink,wname,"status=no,width=" + usrw + ",height=" + usrh + ",resizable=yes,left=" + iMyWidth + ",top=" + iMyHeight + ",screenX=" + iMyWidth + ",screenY=" + iMyHeight + ",toolbar=no,menubar=no,scrollbars=no,location=no,directories=no");
	
	mywin.focus();
}//End Popup Window Function


/*Legal Form Validation*/
function validatesend(frm)
{
objForm=frm;
if(isEmpty(objForm.fname.value))
{
	window.alert("Please enter your Name");
	objForm.fname.focus();
	return false;
}
if(isEmpty(objForm.fadd.value))
{
	window.alert("Please enter your Address");
	objForm.fadd.focus();
	return false;
}
if (!(ValidEmail(objForm.email.value)))
{
	window.alert("Please enter valid email address");
	objForm.email.focus();
	return false;
}
if(!(ValidNumber(objForm.ph.value)))
{
	window.alert("Please enter your Phone no.");
	objForm.ph.focus();
	return false;
}
if(!(ValidNumber(objForm.std.value)))
{
	window.alert("Please enter your Phone no.");
	objForm.std.focus();
	return false;
}
if(isEmpty(objForm.cname.value))
{
	window.alert("Please enter your Company Name");
	objForm.cname.focus();
	return(false);
}
return(true);
}
function isEmpty(item)
{
	if(item=="")
	{
		return true;
	}
	else
	{
		return false;
	}
}
function ValidNumber(thestring)
{
    for (i = 0; i < thestring.length; i++) {
        ch = thestring.substring(i, i+1);
        if (ch < "0" || ch > "9")
          {
          alert("The numbers may contain digits 0 thru 9 only!");
          return false;
          }
    }
    return true;
}

function ValidEmail(item)
{
	if (!ValidLength(item, 5)) return false;
	if (item.indexOf ('@', 0) == -1) return false;
	if (item.indexOf ('"', 0) != -1) return false;
	if (item.indexOf ('\'', 0) != -1) return false;
	if (item.indexOf ('.', 0) == -1) return false;
	return true;
}
//function to validate by length
function ValidLength(item, len)
{
return (item.length >= len);
}


// home page client list
currentIndx=0;
MyImages=new Array();
MyImages[0]='images/accelerare.gif';
MyImages[1]='images/bercos.gif';
MyImages[2]='images/kimdercare.gif';
MyImages[3]='images/vidyalanker1.gif';
MyImages[4]='images/matrusri.gif';
MyImages[5]='images/safal.gif';
MyImages[6]='images/kompass.gif';
MyImages[7]='images/shathayu.gif';
MyImages[8]='images/krono.gif';
MyImages[9]='images/sports.gif';
MyImages[10]='images/neulife.gif';









Messages=new Array()
Messages[0]='Accelerate part of  Mahavir Auto Group, 43 year old organization with operations across Tamilnadu...';
Messages[1]='With over 3 decades of industry expertise, the brand has not only mastered the art of culinary. Berco’s...';
Messages[2]='With more than 2 decades of enriching experience and unmatched expertise in kids grooming, Kinder Care...';
Messages[3]='Vidyalankar started its operations in a small rented school class room in 1960, and over the years, it has...';
Messages[4]='MATRUSRI E-POWER is a Private Limited Company, incorporated in 2005 at Hyderabad and is involved in designing...';
Messages[5]='Safal is India’s first organized modern format chain of stores in fresh fruits and vegetables (F&amp;V)...';
Messages[6]='Incorporated in 1987 by a team of visionary educationists and highly professional management team, today...';
Messages[7]='Shathayu Ayurveda was established by Vaidyaratna Ramayya Swamy with an intention of providing...';
Messages[8]='Krono iinc is a leading company offering complete digital and direct marketing solution to your...';
Messages[9]='A sports based play programme for preschool and primary school children between the ages of 2.5 & 8 years...';
Messages[10]='Started in 1997 by fitness enthusiast and MD, SAMIT GUPTA, NEULIFE is the pioneer of the Indian sports...';








imagesPreloaded = new Array(11)
for (var i = 0; i < MyImages.length ; i++) 
{
imagesPreloaded[i] = new Image(163,81)
imagesPreloaded[i].src=MyImages[i]
}

function Nexter(){
if (currentIndx<imagesPreloaded.length-1){
currentIndx=currentIndx+1;
document.theImage.src=imagesPreloaded[currentIndx].src
document.form1.text1.value=Messages[currentIndx];
document.theImage.title=Messages[currentIndx];
}
else {
 currentIndx=0
document.theImage.src=imagesPreloaded[currentIndx].src
document.form1.text1.value=Messages[currentIndx];
document.theImage.title=Messages[currentIndx];
}
}
function Backer(){
if (currentIndx>0){
currentIndx=currentIndx-1;
document.theImage.src=imagesPreloaded[currentIndx].src
document.form1.text1.value=Messages[currentIndx];
document.theImage.title=Messages[currentIndx];
}
else {
 currentIndx=11
document.theImage.src=imagesPreloaded[currentIndx].src
document.form1.text1.value=Messages[currentIndx];
document.theImage.title=Messages[currentIndx];
}}
function automaticly() {
	if (document.form1.automatic.checked) {
if (currentIndx<imagesPreloaded.length){
currentIndx=currentIndx
}
else {
 currentIndx=0
}	
document.theImage.src=imagesPreloaded[currentIndx].src
document.form1.text1.value=Messages[currentIndx];
document.theImage.title=Messages[currentIndx];
currentIndx=currentIndx+1;
var delay = setTimeout("automaticly()",3500)
	}
}
