<!-- VITAL ONLINE STUDIO LIMITED -->				
<!-- The Tower -->					
<!-- Hornbeam Park -->					
<!-- Harrogate -->					
<!-- North Yorkshire UK	 -->			
<!-- HG2 8QT -->						
<!-- t: ++ (0)1423 855700 -->				
<!-- f: ++ (0)1423 855745 -->				
<!-- e: webmaster@vital.co.uk -->			
<!-- http://www.vital.co.uk -->				

<!-- COPYRIGHT -->				
<!-- Vital Online Studio Limited reserves copyright in all material -->	
<!-- including photographs and artwork appearing on these pages, -->	
<!-- except where an explicit statement to the contrary appears -->	
<!-- on any particular page, or where copyright is retained by -->	
<!-- third parties. -->						
								
<!-- You have the right to view this page and, where applicable, -->	
<!-- to copy this page and any images to a cache for reference by -->	
<!-- yourself only at a later time for your own personal and -->	
<!-- non-commercial use.  No further rights are granted to  -->	
<!-- reproduce or distribute any material appearing on these -->	
<!-- pages. -->							

<!-- TRADEMARKS -->				
<!-- All trademarks mentioned on these pages whether registered -->
<!-- or unregistered are the property of their respective owners -->
<!-- whose rights are acknowledged. -->
<!--
function doContinue(slot)
{
	if(validForm()){
		
		var from_image = document.frmImage.FILE1.value;
		var theForm = 'myform' + slot;

		var agent = navigator.userAgent.toLowerCase();
		var isMac = (agent.indexOf("mac")!=-1); 

		if(isMac) {
			var origStr = from_image;
			var lenStr = origStr.indexOf('/User');
			var oldStr = origStr.substr(0,lenStr);
			var newStr = 'file://' + origStr.slice(lenStr);

			from_image = newStr;
					
		}


		thumbnailframe.document.images['post' + slot].src = from_image;
		thumbnailframe.document.forms[theForm].newpath.value = from_image;
		showHideLayers('thumbnails','','show','upload','','hide');

		loc = from_image;
		out = "\\";
		add = "/"; 
		temp = "" + loc;
		var alpha = /\w/;
		var msg = 'Please correct the following to continue ...\n';
		var err = false;
		
		if(loc != '')
		{
		var dotPos = loc.lastIndexOf('.');
		var slashPos = loc.lastIndexOf('\\');
		var ext = loc.substr(dotPos,loc.length).toLowerCase();
		var myName = loc.substr((slashPos+1),dotPos-(slashPos+1)).toLowerCase();
		
			
		
		if (alpha.test(myName))		
		{
			if ((ext != '.jpg') && (ext != '.jpeg'))	
			{
				msg += '\n\"Doc Type\" is not a recognised file type. (.jpg and .jpeg only)';
				err = true;}			
		}	
			else	
			{
				msg += '\n\"Doc Name\" Needs an alphanumeric name.';
				err = true;	}	
			}
			
		else	
		{
			msg += '\n\Need a "Doc\".';
			err = true;	
		}
		
		if(err)
		{
			alert(msg);
		}
		else
		{		
			while (temp.indexOf(out)>-1) {
			pos= temp.indexOf(out);
			temp = "" + (temp.substring(0, pos) + add + 
			temp.substring((pos + out.length), temp.length));
		}
		
		
		
		if (scrVar == true) {
				vista.vmp.SetProperty('MTSTimeElem.scroll_poster' + slot + 'b', 'Path', temp, 'mts_str');
				vista.vmp.TriggerAnim('MTSTimeElem.scroll_poster' + slot + 'b');
				vista.vmp.TriggerAnim('poster_change' + slot + '');
					
		}
		else {
				vista.vmp.SetProperty('MTSTimeElem.poster2', 'Path', temp, 'mts_str');
				vista.vmp.TriggerAnim('MTSTimeElem.poster2');
				vista.vmp.TriggerAnim('poster_change');
				
		}
		
		}
	}
}

function doContinueFromThumb(slot)
{
	

		var theForm = 'myform' + slot;
		var from_image = document.images['post' + slot].src

		
		loc = from_image;
		out = "\\";
		add = "/"; 
		temp = "" + loc;
		var alpha = /\w/;
		var msg = 'Please correct the following to continue ...\n';
		var err = false;
		
		if(loc != '')
		{
		var dotPos = loc.lastIndexOf('.');
		var slashPos = loc.lastIndexOf('\\');
		var ext = loc.substr(dotPos,loc.length).toLowerCase();
		var myName = loc.substr((slashPos+1),dotPos-(slashPos+1)).toLowerCase();
		
			
		
		if (alpha.test(myName))		
		{
			if ((ext != '.jpg') && (ext != '.jpeg'))	
			{
				msg += '\n\"Doc Type\" is not a recognised file type. (.jpg and .jpeg only)';
				err = true;}			
		}	
			else	
			{
				msg += '\n\"Doc Name\" Needs an alphanumeric name.';
				err = true;	}	
			}
			
		else	
		{
			msg += '\n\Need a "Doc\".';
			err = true;	
		}
		
		if(err)
		{
			alert(msg);
		}
		else
		{		
			while (temp.indexOf(out)>-1) {
			pos= temp.indexOf(out);
			temp = "" + (temp.substring(0, pos) + add + 
			temp.substring((pos + out.length), temp.length));
		}
		
		
		
		if (parent.scrVar == true) {
				parent.vista.vmp.SetProperty('MTSTimeElem.scroll_poster' + slot + 'b', 'Path', temp, 'mts_str');
				parent.vista.vmp.TriggerAnim('MTSTimeElem.scroll_poster' + slot + 'b');
				parent.vista.vmp.TriggerAnim('poster_change' + slot + '');
					
		}
		else {
				
				parent.vista.vmp.SetProperty('MTSTimeElem.poster2', 'Path', temp, 'mts_str');
				parent.vista.vmp.TriggerAnim('MTSTimeElem.poster2');
				parent.vista.vmp.TriggerAnim('poster_change');
				
		}
		}
		
	}


function shownewuserpic(slot) {
	{
		loc = document.forms["myform" + slot].newpath.value;
		
		out = "\\";
		add = "/"; 
		temp = "" + loc;
		var alpha = /\w/;
		var msg = 'Please correct the following to continue ...\n';
		var err = false;

		
		if(loc != '')
		{
		var dotPos = loc.lastIndexOf('.');
		var slashPos = loc.lastIndexOf('\\');
		var ext = loc.substr(dotPos,loc.length).toLowerCase();
		var myName = loc.substr((slashPos+1),dotPos-(slashPos+1)).toLowerCase();
			
		
		if (alpha.test(myName))		
		{
			if ((ext != '.jpg') && (ext != '.jpeg'))	
			{
				msg += '\n\"Doc Type\" is not a recognised file type. (.jpg and .jpeg only)';
				err = true;}			
		}	
			else	
			{
				msg += '\n\"Doc Name\" Needs an alphanumeric name.';
				err = true;	}	
			}
			
		else	
		{
			msg += '\n\Need a "Doc\".';
			err = true;	
		}
		
		if(err)
		{
			alert(msg);
		}
		else
		{		
			while (temp.indexOf(out)>-1) {
			pos= temp.indexOf(out);
			temp = "" + (temp.substring(0, pos) + add + 
			temp.substring((pos + out.length), temp.length));
		}

		
		if (scrolling == 'yes' ) {
				window.vmp.SetProperty('MTSTimeElem.scroll_poster' + slot + 'b', 'Path', temp, 'mts_str');
				window.vmp.TriggerAnim('MTSTimeElem.scroll_poster' + slot + 'b');
				window.vmp.TriggerAnim('poster_change' + slot + '');
			}
			else {
				window.vmp.SetProperty('MTSTimeElem.poster2', 'Path', temp, 'mts_str');
				window.vmp.TriggerAnim('MTSTimeElem.poster2');
				window.vmp.TriggerAnim('poster_change');
			}
		
		}

		}
}

function validForm()
{
	var theForm = document.frmImage;
	var msg = 'Please correct the following to continue ...\n';
	var err = false;
	var field;
	var invalid = /(@.*@)|(\.\.)|(@\.)|(\.@)|(^\.)/;
	var valid = /^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,3}|[0-9]{1,3})(\]?)$/;
	if(theForm.FILE1.value == '')
	{
		msg += '\nEnter an Image to Upload.';
		if(!err)
		{
			field = theForm.FILE1;
			err = true;
		}
	}
	if(theForm.FILE1.value != ''){
		var filename = theForm.FILE1.value;
		var dotPos = filename.lastIndexOf('.');
		var ext = filename.substr(dotPos,filename.length).toLowerCase();
		switch(ext){
			case '.jpeg':
				return(true);
			case '.jpg':
				return(true);
			}
			msg += '\nThe filename must be a jpg image type..';
		if(!err)
		{
			field = theForm.FILE1;
			err = true;
		}
	}
	if(err)
	{
		alert(msg);
		field.focus();
		return(false);
	}
	return(true);
}
