<!-- Display video success stories -->
function nextWindow(sRef) {
 var strUrl = '/solutions/success_stories/videos/Real/pickapp2.asp' + sRef;
 // alert(strUrl);
 var HelpPop = window.open(strUrl,"","height=320,width=280");
}
function helptext() {
  window.open('/solutions/success_stories/videos/help.asp','newwin','toolbar=no,location=no,scrollbars=no,width=560,height=320')
}

<!-- Pulldown menu for hyperlinks -->
<!-- Original: Alex Tu <boudha1@hotmail.com> -->
<!-- The JavaScript Source!! http://javascript.internet.com -->
function formHandler(form){
var URL = document.form.site.options[document.form.site.selectedIndex].value;
window.location.href = URL;
}

<!-- Radiobuttons for hyperlinks or email links -->
<!-- Original:  Wayne Nolting (w.nolting@home.com) -->
<!-- The JavaScript Source!! http://javascript.internet.com -->
function go(loc) {
window.location.href = loc;
}

<!-- Open stripped down window (small) -->
function openSmallWin(URL) {
aWindow = window.open(URL,"thewindow","width=200,height=200,toolbar=no,status=no,scrollbars=yes,resizable=yes,menubar=no");
}
<!-- Open stripped down window (medium) -->
function openMediumWin(URL) {
aWindow = window.open(URL,"thewindow","width=525,height=425,toolbar=no,status=no,scrollbars=yes,resizable=yes,menubar=no");
}
<!-- Open stripped down window (large) -->
function openLargeWin(URL) {
aWindow = window.open(URL,"thewindow","width=750,height=600,toolbar=no,status=no,scrollbars=yes,resizable=yes,menubar=no");
}
<!-- Open stripped down window (large) -->
function openLarge2Win(URL) {
aWindow = window.open(URL,"thewindow2","width=700,height=550,toolbar=no,status=no,scrollbars=yes,resizable=yes,menubar=no");
}
<!-- Open stripped down window (vlarge) -->
function openVLargeWin(URL) {
aWindow = window.open(URL,"thewindow2","width=1020,height=800,toolbar=no,status=no,scrollbars=yes,resizable=yes,menubar=no");
}
<!-- Open stripped down window for Tablets Flash movie -->
function openFlashWin(URL) {
aWindow = window.open(URL,"thewindow","width=595,height=315,toolbar=no,status=no,scrollbars=no,resizable=no,menubar=no");
}
<!-- Open stripped down window for new Video App Stories -->
function openVideoWin(URL) {
aWindow = window.open(URL,"thewindow","width=555,height=340,toolbar=no,status=no,scrollbars=no,resizable=no,menubar=no");
}
<!-- Open stripped down window for new Video App Stories -->
function openPTVideoWin(URL) {
aWindow = window.open(URL,"thewindow","width=555,height=375,toolbar=no,status=no,scrollbars=no,resizable=no,menubar=no");
}
<!-- Open stripped down window for new Video App Stories -->
function openOICWin(URL) {
aWindow = window.open(URL,"thewindow","width=450,height=585,toolbar=no,status=no,scrollbars=no,resizable=no,menubar=no");
}
<!-- Open stripped down window for SFc form -->
function openSFcWin(URL) {
aWindow = window.open(URL,"thewindow2","width=810,height=600,toolbar=no,status=no,scrollbars=yes,resizable=yes,menubar=no");
}

/*Current date script credit: JavaScript Kit (www.javascriptkit.com) Over 200+ free scripts here! */
function displayCurrentYear() {
var mydate=new Date();
var year=mydate.getYear();
if (year < 1000)
{
year+=1900;
}
return year;
}

// Script Source: CodeLifter.com
// Copyright 2003
// Do not remove this notice.

// SETUPS:
// ===============================

// Set the horizontal and vertical position for the popup

PositionX = 100;
PositionY = 100;

// Set these value approximately 20 pixels greater than the
// size of the largest image to be used (needed for Netscape)

defaultWidth  = 500;
defaultHeight = 500;

// Set autoclose true to have the window close automatically
// Set autoclose false to allow multiple popup windows

var AutoClose = true;

// Do not edit below this line...
// ================================
if (parseInt(navigator.appVersion.charAt(0))>=4){
var isNN=(navigator.appName=="Netscape")?1:0;
var isIE=(navigator.appName.indexOf("Microsoft")!=-1)?1:0;}
var optNN='scrollbars=no,width='+defaultWidth+',height='+defaultHeight+',left='+PositionX+',top='+PositionY;
var optIE='scrollbars=no,width=100,height=100,left='+PositionX+',top='+PositionY;
function popImage(imageURL,imageTitle){
if (isNN){imgWin=window.open('about:blank','',optNN);}
if (isIE){imgWin=window.open('about:blank','',optIE);}
with (imgWin.document){
writeln('<html><head><title>Loading...</title><style>body{margin:0px;}</style>');writeln('<sc'+'ript>');
writeln('var isNN,isIE;');writeln('if (parseInt(navigator.appVersion.charAt(0))>=4){');
writeln('isNN=(navigator.appName=="Netscape")?1:0;');writeln('isIE=(navigator.appName.indexOf("Microsoft")!=-1)?1:0;}');
writeln('function reSizeToImage(){');writeln('if (isIE){');writeln('window.resizeTo(100,100);');
// MFujii: Original width and height 100
writeln('width=250-(document.body.clientWidth-document.images[0].width);');
writeln('height=150-(document.body.clientHeight-document.images[0].height);');
writeln('window.resizeTo(width,height);}');writeln('if (isNN){');       
writeln('window.innerWidth=document.images["George"].width;');writeln('window.innerHeight=document.images["George"].height;}}');
writeln('function doTitle(){document.title="'+imageTitle+'";}');writeln('</sc'+'ript>');
if (!AutoClose) writeln('</head><body bgcolor=000000 scroll="no" onload="reSizeToImage();doTitle();self.focus()">')
else writeln('</head><body bgcolor=000000 scroll="no" onload="reSizeToImage();doTitle();self.focus()" onblur="self.close()">');
writeln('<img name="George" src='+imageURL+' style="display:block"></body></html>');
close();		
}}


// FONCTION JAVASCRIPT BACK OFFICE [tibo-10-02-2004]



/*********************************************/
/*   Alert    */
/*********************************************/
//  Messages de confirmation
var confirmSubmitMessage = "Confirmation d'enregistrement";
var confirmDeleteMessage = "Confirmation de suppression";
// Message format de l'adresse mail
var messageMailFormat = "Format d'adresse mail *@*.*";
// Message erreur champ vide
errorMessageIsNull = "Veuillez remplir ce champ";
// Message erreur nombre
errorMessageIsNumber = "Vous devez entrer un nombre";
// message erreur valeur trop courte
errorMessageIsLittle = "Longueur minimale attendue : ";
// Message format de champ date + heure
var messageDateTimeFormat = "Date + time format mm-dd-yyyy hh:mm";
var messageDateFormat = "Date format mm-dd-yyyy";
var messageTimeFormat = "Time format hh:mm";

/*********************************/
/*   Fonctions de confirmation   */
/*********************************/
// Confirmation de l'enregistrement
function confirmSubmit()
{
		return confirm(confirmSubmitMessage);		
}
// Confirmation de la suppression
function confirmDelete()
{
		return confirm(confirmDeleteMessage);
}

/****************************/
/*   Fonctions de control   */
/****************************/
// Test si le champ est un nombre
function checkIsNumber( fieldName, checkedForm )
{
		if (isNaN(document[checkedForm][fieldName].value))
		{
			alert( errorMessageIsNumber );
			document[checkedForm][fieldName].focus();
			return true;
		} 
		else
		{
			return false;
		}
}

// Test si le champ est vide
function checkIsNull( fieldName, checkedForm )
{
		if (document[checkedForm][fieldName].value == "")
		{
			alert( errorMessageIsNull );
			document[checkedForm][fieldName].focus();
			return true;
			
		} 
		else
		{
			return false;
		}
}

// Controle de mail (format *@*.*)
function checkMail(mailP)
{
	// Expression régulière attendue
	re = /^\S+@\S+\.\S+$/g;
	
	if (mailP.search(re) == -1)
	{
		alert(messageMailFormat);
		return false;
	}	
	return true;
}
// Test de mail si le champ n'est pas vide
function checkIsMail( fieldName, checkedForm )
{
		if (document[checkedForm][fieldName].value != "")
		{		
		
				if (!checkMail(document[checkedForm][fieldName].value))
				{
					document[checkedForm][fieldName].focus();
					return true;
				}		
				else
				{
					return false;
				}		
		} 
		else
		{
			return false;
		}
}
// Test si un champ a la longueur minimale desiree
function checkLength( fieldName, checkedForm, lengthMin )
{
		if (document[checkedForm][fieldName].value != "")
		{		
				var result = document[checkedForm][fieldName].value;
				
				if (result.length < [lengthMin])
				{
					alert( errorMessageIsLittle+lengthMin );
					document[checkedForm][fieldName].focus();
					return true;
				}		
				else
				{
					return false;
				}		
		} 
		else
		{
			return false;
		}
}
// Controle d'un champ Date + heure
function checkDateTime(datetimeP)
{
	// Expression régulière attendue mm-dd-yyyy hh:mm
		re = /^((1[0-2])|(0[0-9]))-((3[0-1])|([0-2][0-9]))-([0-9]){4}\s(([2][0-3])|([0-1][0-9]))(:[0-5][0-9]){1,2}$/g;
	if (datetimeP.search(re) == -1)
	{
		alert(messageDateTimeFormat);
		return false;
	}	
	return true;
}

// Controle d'un champ Date + heure
function checkDate(dateP)
{
	// Expression régulière attendue mm-dd-yyyy
		re = /^((1[0-2])|(0[0-9]))-((3[0-1])|([0-2][0-9]))-([0-9]){4}$/g;;
	if (dateP.search(re) == -1)
	{
		alert(messageDateFormat);
		return false;
	}
	return true;
}

// Controle d'un champ Date + heure
function checkTime(timeP)
{
	// Expression régulière attendue hh:mm
		re = /^(([2][0-3])|([0-1][0-9]))(:[0-5][0-9]){1,2}$/g;
	if (timeP.search(re) == -1)
	{
		alert(messageTimeFormat);
		return false;
	}
	return true;
}


// Test du champ date + heure si le champ n'est pas vide
function checkIsDateTime( fieldName, checkedForm )
{
		if (document[checkedForm][fieldName].value != "")
		{		
		
				if (!checkDateTime(document[checkedForm][fieldName].value))
				{
					document[checkedForm][fieldName].focus();
					return true;
				}		
				else
				{
					return false;
				}		
		} 
		else
		{
			return false;
		}
}


// Test du champ date + heure si le champ n'est pas vide
function checkIsDate( fieldName, checkedForm )
{
		if (document[checkedForm][fieldName].value != "")
		{

				if (!checkDate(document[checkedForm][fieldName].value))
				{
					document[checkedForm][fieldName].focus();
					return true;
				}
				else
				{
					return false;
				}
		}
		else
		{
			return false;
		}
}

// Test du champ date + heure si le champ n'est pas vide
function checkIsTime( fieldName, checkedForm )
{
		if (document[checkedForm][fieldName].value != "")
		{

				if (!checkTime(document[checkedForm][fieldName].value))
				{
					document[checkedForm][fieldName].focus();
					return true;
				}
				else
				{
					return false;
				}
		}
		else
		{
			return false;
		}
}





// picture controle
function checkImage( fieldName, checkedForm )
{
		//re = /^\S+@\S+\.\S+$/g;
		
		img = document[checkedForm][fieldName].value;
		//alert(img);
		re = /^\S+([0-9A-Za-z]|[[:alnum:]]|)((.JPG)|(.jpg))$/g;
		
		if (img.search(re) == -1)
		{
			alert("You should upload only jpg file with an explicit extension and no space or special character in the file name");
			return true;
		}	
		return false;
}

// audio file controle
function checkSon( fieldName, checkedForm )
{
		//re = /^\S+@\S+\.\S+$/g;

		media = document[checkedForm][fieldName].value;
		//alert(img);
		re = /^\S+([0-9A-Za-z]|[[:alnum:]]|)((.MP3)|(.mp3))$/g;

		if (media.search(re) == -1)
		{
			alert("You should upload only mp3 file with an explicit extension and no space or special character in the file name");
			return true;
		}
		return false;
}

//flash file control
function checkFlash( fieldName, checkedForm )
{
		//re = /^\S+@\S+\.\S+$/g;

		media = document[checkedForm][fieldName].value;
		re = /^\S+([0-9A-Za-z]|[[:alnum:]]|)((.SWF)|(.swf))$/g;

		if (media.search(re) == -1)
		{
			alert("You should upload only swf file with an explicit extension and no space or special character in the file name");
			return true;
		}
		return false;
}


function new_window(theURL,winName,features) 
	{
		window.open(theURL,winName,features);
	}

	
// fonction resize d'une openWindow

function resize()
	{
		if (document.layers) 
			{ 
				screenwidth=document.general.document.width+37;
				screenheight=document.general.document.height+35;
				window.moveTo(10,10);
				eval("window.resizeTo("+screenwidth+", "+screenheight+")"); 
			} 
			
		if (document.all) 
			{ 
				window.resizeTo(0,0);
				screenwidth=document.all.general.scrollWidth+37;
				screenheight=document.all.general.scrollHeight+35;
				window.moveTo(10,10);
				eval("window.resizeTo("+screenwidth+", "+screenheight+")"); 
			}	 
	}
 
 // Passe la fenêtre au premier plan
if (window.focus) 
	{
 		self.focus();
	}
//-->


