
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/cheisrian.gif';
MyImages[1]='images/videocon.gif';
MyImages[2]='images/kompass.gif';
MyImages[3]='images/goodthings.gif';
MyImages[4]='images/dr_lal_path.gif';
MyImages[5]='images/safal.gif';
MyImages[6]='images/3m.gif';
MyImages[7]='images/hobby.gif';
MyImages[8]='images/premier.gif';
MyImages[9]='images/bansal.gif';
MyImages[10]='images/dm_exclusive.gif';
MyImages[11]='images/harvest.gif';
MyImages[12]='images/mytvs.gif';



Messages=new Array()
Messages[0]='Christian Fabre Textiles Pvt. Ltd. was initially known as Fashions International...';
Messages[1]='Videocon, a behemoth in consumer durable industry, entered Telecom & currently holds 4mn subscribers...';
Messages[2]='Incorporated in 1987 by a team of visionary educationists and highly professional management team...';
Messages[3]='Established over a decade back, Good Things began its operations in 1998 under the leadership...';
Messages[4]='Late Dr. (Major) S.K. Lal, a pioneer in the field of pathology who had been trained in the army...';
Messages[5]='Safal is India’s first organized modern format chain of stores in fresh fruits and vegetables...';
Messages[6]='3M is a diversified technology company with a worldwide presence spanning Consumer & Office...';
Messages[7]='Since its inception in 1959, Pidilite Industries Limited has been a pioneer in consumer...';
Messages[8]='In the world of steel, Premier Group is synonymous with manufacturing superior quality...';
Messages[9]='At Bansal Tutorials, we firmly believe that theories only provide a  conceptual framework...';
Messages[10]='Leading the space of trims & profiles in India, Karnataka based Décor Marketing established...';
Messages[11]='';
Messages[12]='';









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

