<!--


//~/System/Script/Flash.js

/**

 * SWFObject v1.4.4: Flash Player detection and embed - http://blog.deconcept.com/swfobject/

 *

 * SWFObject is (c) 2006 Geoff Stearns and is released under the MIT License:

 * http://www.opensource.org/licenses/mit-license.php

 *

 * **SWFObject is the SWF embed script formerly known as FlashObject. The name was changed for

 *   legal reasons.

 */

if(typeof deconcept=="undefined"){var deconcept=new Object();}

if(typeof deconcept.util=="undefined"){deconcept.util=new Object();}

if(typeof deconcept.SWFObjectUtil=="undefined"){deconcept.SWFObjectUtil=new Object();}

deconcept.SWFObject=function(_1,id,w,h,_5,c,_7,_8,_9,_a,_b){if(!document.getElementById){return;}

this.DETECT_KEY=_b?_b:"detectflash";

this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY);

this.params=new Object();

this.variables=new Object();

this.attributes=new Array();

if(_1){this.setAttribute("swf",_1);}

if(id){this.setAttribute("id",id);}

if(w){this.setAttribute("width",w);}

if(h){this.setAttribute("height",h);}

if(_5){this.setAttribute("version",new deconcept.PlayerVersion(_5.toString().split(".")));}

this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion();

if(c){this.addParam("bgcolor",c);}

var q=_8?_8:"high";

this.addParam("quality",q);

this.setAttribute("useExpressInstall",_7);

this.setAttribute("doExpressInstall",false);

var _d=(_9)?_9:window.location;

this.setAttribute("xiRedirectUrl",_d);

this.setAttribute("redirectUrl","");

if(_a){this.setAttribute("redirectUrl",_a);}};

deconcept.SWFObject.prototype={setAttribute:function(_e,_f){

this.attributes[_e]=_f;

},getAttribute:function(_10){

return this.attributes[_10];

},addParam:function(_11,_12){

this.params[_11]=_12;

},getParams:function(){

return this.params;

},addVariable:function(_13,_14){

this.variables[_13]=_14;

},getVariable:function(_15){

return this.variables[_15];

},getVariables:function(){

return this.variables;

},getVariablePairs:function(){

var _16=new Array();

var key;

var _18=this.getVariables();

for(key in _18){_16.push(key+"="+_18[key]);}

return _16;},getSWFHTML:function(){var _19="";

if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){

if(this.getAttribute("doExpressInstall")){

this.addVariable("MMplayerType","PlugIn");}

_19="<embed type=\"application/x-shockwave-flash\" src=\""+this.getAttribute("swf")+"\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\"";

_19+=" id=\""+this.getAttribute("id")+"\" name=\""+this.getAttribute("id")+"\" ";

var _1a=this.getParams();

for(var key in _1a){_19+=[key]+"=\""+_1a[key]+"\" ";}

var _1c=this.getVariablePairs().join("&");

if(_1c.length>0){_19+="flashvars=\""+_1c+"\"";}_19+="/>";

}else{if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");}

_19="<object id=\""+this.getAttribute("id")+"\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\">";

_19+="<param name=\"movie\" value=\""+this.getAttribute("swf")+"\" />";

var _1d=this.getParams();

for(var key in _1d){_19+="<param name=\""+key+"\" value=\""+_1d[key]+"\" />";}

var _1f=this.getVariablePairs().join("&");

if(_1f.length>0){_19+="<param name=\"flashvars\" value=\""+_1f+"\" />";}_19+="</object>";}

return _19;

},write:function(_20){

if(this.getAttribute("useExpressInstall")){

var _21=new deconcept.PlayerVersion([6,0,65]);

if(this.installedVer.versionIsValid(_21)&&!this.installedVer.versionIsValid(this.getAttribute("version"))){

this.setAttribute("doExpressInstall",true);

this.addVariable("MMredirectURL",escape(this.getAttribute("xiRedirectUrl")));

document.title=document.title.slice(0,47)+" - Flash Player Installation";

this.addVariable("MMdoctitle",document.title);}}

if(this.skipDetect||this.getAttribute("doExpressInstall")||this.installedVer.versionIsValid(this.getAttribute("version"))){

var n=(typeof _20=="string")?document.getElementById(_20):_20;

n.innerHTML=this.getSWFHTML();return true;

}else{if(this.getAttribute("redirectUrl")!=""){document.location.replace(this.getAttribute("redirectUrl"));}}

return false;}};

deconcept.SWFObjectUtil.getPlayerVersion=function(){

var _23=new deconcept.PlayerVersion([0,0,0]);

if(navigator.plugins&&navigator.mimeTypes.length){

var x=navigator.plugins["Shockwave Flash"];

if(x&&x.description){_23=new deconcept.PlayerVersion(x.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."));}

}else{try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");}

catch(e){try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");

_23=new deconcept.PlayerVersion([6,0,21]);axo.AllowScriptAccess="always";}

catch(e){if(_23.major==6){return _23;}}try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");}

catch(e){}}if(axo!=null){_23=new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));}}

return _23;};

deconcept.PlayerVersion=function(_27){

this.major=_27[0]!=null?parseInt(_27[0]):0;

this.minor=_27[1]!=null?parseInt(_27[1]):0;

this.rev=_27[2]!=null?parseInt(_27[2]):0;

};

deconcept.PlayerVersion.prototype.versionIsValid=function(fv){

if(this.major<fv.major){return false;}

if(this.major>fv.major){return true;}

if(this.minor<fv.minor){return false;}

if(this.minor>fv.minor){return true;}

if(this.rev<fv.rev){

return false;

}return true;};

deconcept.util={getRequestParameter:function(_29){

var q=document.location.search||document.location.hash;

if(q){var _2b=q.substring(1).split("&");

for(var i=0;i<_2b.length;i++){

if(_2b[i].substring(0,_2b[i].indexOf("="))==_29){

return _2b[i].substring((_2b[i].indexOf("=")+1));}}}

return "";}};

deconcept.SWFObjectUtil.cleanupSWFs=function(){if(window.opera||!document.all){return;}

var _2d=document.getElementsByTagName("OBJECT");

for(var i=0;i<_2d.length;i++){_2d[i].style.display="none";for(var x in _2d[i]){

if(typeof _2d[i][x]=="function"){_2d[i][x]=function(){};}}}};

deconcept.SWFObjectUtil.prepUnload=function(){__flash_unloadHandler=function(){};

__flash_savedUnloadHandler=function(){};

if(typeof window.onunload=="function"){

var _30=window.onunload;

window.onunload=function(){

deconcept.SWFObjectUtil.cleanupSWFs();_30();};

}else{window.onunload=deconcept.SWFObjectUtil.cleanupSWFs;}};

if(typeof window.onbeforeunload=="function"){

var oldBeforeUnload=window.onbeforeunload;

window.onbeforeunload=function(){

deconcept.SWFObjectUtil.prepUnload();

oldBeforeUnload();};

}else{window.onbeforeunload=deconcept.SWFObjectUtil.prepUnload;}

if(Array.prototype.push==null){

Array.prototype.push=function(_31){

this[this.length]=_31;

return this.length;};}

var getQueryParamValue=deconcept.util.getRequestParameter;

var FlashObject=deconcept.SWFObject;

var SWFObject=deconcept.SWFObject;

//~/System/Script/SFHover.js

// JavaScript Document

function SymError()
{
  return true;
}

window.onerror = SymError;

var SymRealWinOpen = window.open;

function SymWinOpen(url, name, attributes)
{
  return (new Object());
}

window.open = SymWinOpen;

<!--//--><![CDATA[//><!--

var version=0;
if (navigator.appVersion.indexOf("MSIE")!=-1) {
    temp=navigator.appVersion.split("MSIE");
    version=parseFloat(temp[1]);
}

/*
dynamic menu: fine on current browsers,
problems occur with IE 5.5 and lower so playing it safe
*/
if (version > 5.5) {
  //NON IE browser will return 0
  sfHover = function() {
    var sfEls = document.getElementById("menu").getElementsByTagName("LI");

    for (var i=0; i<sfEls.length; i++) {
        sfEls[i].onmouseover=function() {
            this.className+=" sfhover";
        }
        sfEls[i].onmouseout=function() {
            this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
        }
    }   
  }
  if (window.attachEvent) {
    window.attachEvent("onload", sfHover);
  }
}

function printpage() {
	window.print();  
}
	
function showDiv(obj1,obj2){
	if(document.getElementById){
		var el1 = document.getElementById(obj1);
		var ar1 = document.getElementsByTagName("div"); //DynamicDrive.com change
		if(el1.style.display != "block"){ //DynamicDrive.com change
			for (var i=0; i<ar1.length; i++){
				if (ar1[i].className=="leftmenushowhide") //DynamicDrive.com change
				    ar1[i].style.display = "none";
				if (ar1[i].className=="Flash") 
				    ar1[i].style.display = "none";
			}
			el1.style.display = "block";
		}
		else{
			el1.style.display = "none";
		}
		var el2 = document.getElementById(obj2);
		var ar2 = document.getElementsByTagName("div"); //DynamicDrive.com change
		if(el2.style.display != "block"){ //DynamicDrive.com change
			for (var i=0; i<ar2.length; i++){
				if (ar2[i].className=="homearrowsshowhide") //DynamicDrive.com change
				    ar2[i].style.display = "none";
				if (ar2[i].className=="Flash") 
				    ar2[i].style.display = "none";
			}
			el2.style.display = "block";
		}
		else{
			el2.style.display = "none";
		}
	}
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

function evaswap(obj, val){
  obj.src = val;
}

function clearLoginEmail(){
  document.loginformtop.email.value = '';
}

function clearLoginPassword(){
  document.loginformtop.password.value = '';
}

function clearNewsletter(){
  document.newslettertop.email.value = '';
}

function clearVoucher(){
  document.addvoucher.voucher.value = '';
}

function clearEngraving(){
  document.addtobasket.engraving.value = '';
}

function check_search(form) 
{					
	if (form.criteria.value == ''){
		alert("Please enter your keywords...");
		form.criteria.focus();
		return false;
	}
}

function check_addtobasket(form) {					
	if (form.products_quantity.value == ''){
		alert("Please enter a quantity of greater than 0...");
		form.products_quantity.focus();
		return false;
	}
	if (form.option_chain_id.value == ''){
		alert("Please select your chain option...");
		form.option_chain_id.focus();
		return false;
	}
	if (form.option_earringback_id.value == ''){
		alert("Please select your earring back...");
		form.option_earringback_id.focus();
		return false;
	}
	if (form.option_ringsize_id.value == ''){
		alert("Please select your ring size...");
		form.option_ringsize_id.focus();
		return false;
	}
	if (form.option_titanium_id.value == ''){
		alert("Please select your finish...");
		form.option_titanium_id.focus();
		return false;
	}
	if (form.option_navalbarlength_id.value == ''){
		alert("Please select your length...");
		form.option_navalbarlength_id.focus();
		return false;
	}
	if (document.getElementById("returnable")){
  		if (document.getElementById("returnable").checked != true){
    		alert("You must accept that this item is non-returnable...");
			return false;
		}
	}
}

function check_addvoucher(form) {					
	var emailFilter=/^.+@.+\..{2,3}$/;
	var illegalChars= /[\(\)\<\>\,\;\:\\\/\"\[\]]/;
	if (form.name.value == ''){
		alert("Please enter the recipients name...");
		form.name.focus();
		return false;
	}
	if (form.email.value == '' || form.email.value.match(illegalChars) || !(emailFilter.test(form.email.value))){
		alert("Please enter your email address...");
		form.email.focus();
		return false;
	}
	if (form.deliverydate.value == ''){
		alert("Please enter a delivery date...");
		form.deliverydate.focus();
		return false;
	}
	if (form.products_quantity.value == ''){
		alert("Please enter a quantity of greater than 0...");
		form.products_quantity.focus();
		return false;
	}

}

function check_contact(form) {					
	var emailFilter=/^.+@.+\..{2,3}$/;
	var illegalChars= /[\(\)\<\>\,\;\:\\\/\"\[\]]/;
	if (form.firstname.value == ''){
		alert("Please enter your first name...");
		form.firstname.focus();
		return false;
	}
	if (form.lastname.value == ''){
		alert("Please enter your last name...");
		form.lastname.focus();
		return false;
	}
	if (form.email.value == '' || form.email.value.match(illegalChars) || !(emailFilter.test(form.email.value))){
		alert("Please enter your email address...");
		form.email.focus();
		return false;
	}
	if (form.message.value == ''){
		alert("Please enter a message...");
		form.message.focus();
		return false;
	}
}

function check_login(form) {					
	if (form.email.value == '' || form.email.value == 'email'){
		alert("Please enter your email address...");
		form.email.focus();
		return false;
	}
	if (form.password.value == '' || form.password.value == 'password'){
		alert("Please enter your password...");
		form.password.focus();
		return false;
	}
}

function check_newsletter(form) {					
	var emailFilter=/^.+@.+\..{2,3}$/;
	var illegalChars= /[\(\)\<\>\,\;\:\\\/\"\[\]]/;
	if (form.email.value=='' || form.email.value.match(illegalChars) || !(emailFilter.test(form.email.value))){
		alert("Please enter your email address...");
		form.email.focus();
		return false;
	}
}

function check_join(form) {
	var emailFilter=/^.+@.+\..{2,3}$/;
	var illegalChars= /[\(\)\<\>\,\;\:\\\/\"\[\]]/;
	var radio_choice = false;
	for (counter = 0; counter < form.gender.length; counter++)
	{
	if (form.gender[counter].checked)
	radio_choice = true; 
	}	
	if (!radio_choice)
	{
	alert("Please select a gender...")
	return (false);
	}
	if (form.firstname.value == ''){
		alert("Please enter your first name...");
		form.firstname.focus();
		return false;
	}
	if (form.lastname.value == ''){
		alert("Please enter your last name...");
		form.lastname.focus();
		return false;
	}
	var stripped = form.telephone.value.replace(/[\(\)\.\-\ ]/g, '');
	if (form.telephone.value=='' || isNaN(parseInt(stripped))) {
		alert("Your telephone number is incomplete or contains invalid characters...");
		form.telephone.focus();
		return false;
	}
	if (form.email.value=='' || form.email.value.match(illegalChars) || !(emailFilter.test(form.email.value))){
		alert("Please enter a valid email address...");
		form.email.focus();
		return false;
	}
	if (form.password.value.length < 5){
		alert("Please enter a password of at least 5 characteres...");
		form.password.focus();
		return false;
	}
	if (form.password.value != form.passwordconf.value){
		alert("Your password did not match...");
		form.passwordconf.focus();
		return false;
	}					
}

function check_updateaccount(form) {
	var emailFilter=/^.+@.+\..{2,3}$/;
	var illegalChars= /[\(\)\<\>\,\;\:\\\/\"\[\]]/;
	var radio_choice = false;
	for (counter = 0; counter < form.gender.length; counter++)
	{
	if (form.gender[counter].checked)
	radio_choice = true; 
	}	
	if (!radio_choice)
	{
	alert("Please select a gender...")
	return (false);
	}
	if (form.firstname.value == ''){
		alert("Please enter your first name...");
		form.firstname.focus();
		return false;
	}
	if (form.lastname.value == ''){
		alert("Please enter your last name...");
		form.lastname.focus();
		return false;
	}
	var stripped = form.telephone.value.replace(/[\(\)\.\-\ ]/g, '');
	if (form.telephone.value=='' || isNaN(parseInt(stripped))) {
		alert("Your telephone number is incomplete or contains invalid characters...");
		form.telephone.focus();
		return false;
	}
	if (form.email.value=='' || form.email.value.match(illegalChars) || !(emailFilter.test(form.email.value))){
		alert("Please enter a valid email address...");
		form.email.focus();
		return false;
	}			
}

function check_updatepassword(form) {
	if (form.oldpassword.value == ''){
		alert("Please enter your current password...");
		form.oldpassword.focus();
		return false;
	}
	if (form.password.value.length < 5){
		alert("Please enter a new password of at least 5 characteres...");
		form.password.focus();
		return false;
	}
	if (form.password.value != form.passwordconf.value){
		alert("Your passwords did not match...");
		form.passwordconf.focus();
		return false;
	}			
}

function check_updateaddress(form) {
	var emailFilter=/^.+@.+\..{2,3}$/;
	var illegalChars= /[\(\)\<\>\,\;\:\\\/\"\[\]]/;
	if (form.firstname.value == ''){
		alert("Please enter your first name...");
		form.firstname.focus();
		return false;
	}
	if (form.lastname.value == ''){
		alert("Please enter your last name...");
		form.lastname.focus();
		return false;
	}
	if (form.street_address.value == ''){
		alert("Please enter your address...");
		form.street_address.focus();
		return false;
	}
	if (form.city.value == ''){
		alert("Please enter your city...");
		form.city.focus();
		return false;
	}
	if (form.state.value == ''){
		alert("Please enter your county...");
		form.state.focus();
		return false;
	}
	if (form.postcode.value == ''){
		alert("Please enter your postcode...");
		form.postcode.focus();
		return false;
	}
	if (form.country.value == ''){
		alert("Please select your country...");
		form.country.focus();
		return false;
	}					
}

function check_lostpassword(form) 
{
var emailFilter=/^.+@.+\..{2,3}$/;
var illegalChars= /[\(\)\<\>\,\;\:\\\/\"\[\]]/;
var re = /\s/;									
	if (form.email.value == '' || form.email.value.match(illegalChars) || !(emailFilter.test(form.email.value))){
		alert("Please enter a valid email address...");
		form.email.focus();
		return false;
	}									
}

function check_checkout(form) 
{
var emailFilter=/^.+@.+\..{2,3}$/;
var illegalChars= /[\(\)\<\>\,\;\:\\\/\"\[\]]/;
var re = /\s/;									
	if (form.BillingLastName.value == ''){
		alert("Please enter your surname...");
		form.BillingLastName.focus();
		return false;
	}								
	if (form.BillingFirstName.value == ''){
		alert("Please enter your forename...");
		form.BillingFirstName.focus();
		return false;
	}
	if (form.BillingAddress1.value == ''){
		alert("Please your billing address...");
		form.BillingAddress1.focus();
		return false;
	}
	if (form.BillingCity.value == ''){
		alert("Please enter your billing city...");
		form.BillingCity.focus();
		return false;
	}
	if (form.BillingCounty.value == ''){
		alert("Please enter your billing county...");
		form.BillingCounty.focus();
		return false;
	}
	if (form.BillingPostal.value == ''){
		alert("Please enter your billing post code...");
		form.BillingPostal.focus();
		return false;
	}
	var stripped = form.ShopperTel.value.replace(/[\(\)\.\-\ ]/g, '');
	if (form.ShopperTel.value=='' || isNaN(parseInt(stripped))) {
		alert("Your telephone number is incomplete or contain invalid characters...");
		form.ShopperTel.focus();
		return false;
	}
	if (form.ShopperEmail.value=="" || form.ShopperEmail.value.match(illegalChars) || !(emailFilter.test(form.ShopperEmail.value))){
		alert("Please enter a valid email address...");
		form.ShopperEmail.focus();
		return false;
	}
	if (form.ShippingFirstName.value == ''){
		alert("Please enter your surname...");
		form.ShippingFirstName.focus();
		return false;
	}	
	if (form.ShippingLastName.value == ''){
		alert("Please enter your forename...");
		form.ShippingLastName.focus();
		return false;
	}																
	if (form.ShippingAddress1.value == ''){
		alert("Please your shipping address...");
		form.ShippingAddress1.focus();
		return false;
	}
	if (form.ShippingCity.value == ''){
		alert("Please enter your shipping city...");
		form.ShippingCity.focus();
		return false;
	}
	if (form.ShippingCounty.value == ''){
		alert("Please enter your shipping county...");
		form.ShippingCounty.focus();
		return false;
	}
	if (form.ShippingPostal.value == ''){
		alert("Please enter your shipping post code...");
		form.ShippingPostal.focus();
		return false;
	}
}

function singleSubmit(trgForm)
{
    trgForm.submitButton.disabled = true;
    trgForm.resetButton.disabled = true;
}

function toggleBillingInfo(trgForm)
{
    if (trgForm.SubmitBilling.checked == true)
    {
        trgForm.ShippingFirstName.value = trgForm.BillingFirstName.value ;
        trgForm.ShippingLastName.value = trgForm.BillingLastName.value ;
        trgForm.ShippingAddress1.value = trgForm.BillingAddress1.value ;
        trgForm.ShippingAddress2.value = trgForm.BillingAddress2.value ;
        trgForm.ShippingCity.value =  trgForm.BillingCity.value ;
		trgForm.ShippingCounty.value =  trgForm.BillingCounty.value ;
        trgForm.ShippingPostal.value = trgForm.BillingPostal.value ;
    }
    else
    {
        trgForm.ShippingFirstName.value = "";
        trgForm.ShippingLastName.value = "";
        trgForm.ShippingAddress1.value = "";
        trgForm.ShippingAddress2.value = "";
        trgForm.ShippingCity.value = "";
		trgForm.ShippingCounty.value = "";
        trgForm.ShippingPostal.value = "";
    }
}

function resetDynamicFields()
{
	document.cpiForm.OrderId.value=Math.round(Math.random()*10000000000);
	document.cpiForm.TimeStamp.value=new Date().valueOf();
}
-->