//******************************************************************************

//--- generic_form_service -----------------------------------------------------
function formFieldFocus(idx, f_name) {
	field = fields_ids[idx];
	txt   = fields_txt[idx];
	obj   = eval("document.getElementById(\"" + f_name + "\")." + field);
	if(obj.value == txt) {
		obj.value = "";
	}
	return true;
}

function formFieldBlur(idx, f_name) {
	field = fields_ids[idx];
	txt   = fields_txt[idx];
	obj   = eval("document.getElementById(\"" + f_name + "\")." + field);
	if(obj.value == "") {
		obj.value = txt;
	}
	return true;
}

function submitForm(f_name) {
	for(i = 0; i < fields_ids.length; ++i) {
		obj = eval("document.getElementById(\"" + f_name + "\")." + fields_ids[i]);
		if(obj.value == fields_txt[i]) {
			obj.value = "";
		}
	}
	eval("document.getElementById(\"" + f_name + "\").submit();");
	return false;
}

function setContextForForm(field_name, field_value) {
	eval("document.getElementById(\"" + field_name + "\").value = '" + field_value + "';");
	return false;
}

function detailedFields(field_id) {
	obj = eval("document.getElementById(\"" + field_id + "\")");
	if(!obj.style.display || obj.style.display == "none") {
		obj.style.display = "block";
	} else if(obj.style.display == "block") {
		obj.style.display = "none";
		obj.value = "Please specify";
	}
}

function getElement(elementName) {
	// thanks to http://www.netlobo.com/div_hiding.html
	if (window.document.getElementById) {
		// this is the way the standards work
		thiselement = window.document.getElementById(elementName);
		return true;
	} else if (window.document.all) {
		// this is the way old msie versions work
		thiselement = window.document.all[elementName];
		return true;
	} else if (window.document.layers) {
		// this is the way nn4 works
		thiselement = window.document.layers[elementName];
		return true;
	}
		return false;
}

function checkDivHeight() {
}

function writeFlashButton(rootURL,buttonURL) {
document.write('<span class="accessStyle">[ </span>');
document.write('<a id="ButtonVideo" href="#" onclick="return displayVideo();" title="Watch Video">Watch Video</a>');
document.write('<span class="accessStyle"> ]</span>');
docRoot = rootURL;
flvFilePath = buttonURL;
videoPlayer = true;
}

function writeFlashPlayer() {
  if (videoPlayer) {
  document.write('<object type="application/x-shockwave-flash" data="'+docRoot+'images/video-player.swf?flvpath='+docRoot+flvFilePath+'" width="294" height="318" id="videoplayer" name="videoplayer">');
  document.write('<param name="movie" value="'+docRoot+'images/video-player.swf?flvpath='+docRoot+flvFilePath+'" />');
  document.write('<param name="wmode" value="transparent" />');
  document.write('</object>');
  }
}

function displayVideo() {
  if (getElement('videoPlayerWrapper')) {
    thiselement.style.display = 'block';
  }
}

function hideVideo() {
  if (getElement('videoPlayerWrapper')) {
    thiselement.style.display = 'none';
  }
}








//Disable right mouse click Script
//By Maximus (maximus@nsimail.com) w/ mods by DynamicDrive
//For full source code, visit http://www.dynamicdrive.com

var message="All product images and content are the copyright of Commtel (UK) Ltd";

///////////////////////////////////
function clickIE4(){
if (event.button==2){
alert(message);
return false;
}
}

function clickNS4(e){
if (document.layers||document.getElementById&&!document.all){
if (e.which==2||e.which==3){
alert(message);
return false;
}
}
}

if (document.layers){
document.captureEvents(Event.MOUSEDOWN);
document.onmousedown=clickNS4;
}
else if (document.all&&!document.getElementById){
document.onmousedown=clickIE4;
}

document.oncontextmenu=new Function("alert(message);return false")


