// JavaScript Document


var titles = {'about_eip/approach/home': 'Approach | More | About EIP | Intellectual Property Attorneys and Solicitors, UK and Europe','about_eip/approach': 'Approach | About EIP | Intellectual Property Attorneys and Solicitors, UK and Europe','about_eip/contact/bath': 'Bath | Contact | About EIP | Intellectual Property Attorneys and Solicitors, UK and Europe','about_eip/contact/cardiff': 'Cardiff | Contact | About EIP | Intellectual Property Attorneys and Solicitors, UK and Europe','about_eip/contact/home': 'Contact | More | About EIP | Intellectual Property Attorneys and Solicitors, UK and Europe','about_eip/contact': 'Contact | About EIP | Intellectual Property Attorneys and Solicitors, UK and Europe','about_eip/contact/leeds': 'Leeds | Contact | About EIP | Intellectual Property Attorneys and Solicitors, UK and Europe','about_eip/expertise/home': 'Expertise | More | About EIP | Intellectual Property Attorneys and Solicitors, UK and Europe','about_eip/expertise': 'Expertise | About EIP | Intellectual Property Attorneys and Solicitors, UK and Europe','about_eip/people/!alan_st_george': '!alan St George | People | About EIP | Intellectual Property Attorneys and Solicitors, UK and Europe','about_eip/people/!elaine_de_beer': '!elaine De Beer | People | About EIP | Intellectual Property Attorneys and Solicitors, UK and Europe','about_eip/people/!jonathan_clarke': '!jonathan Clarke | People | About EIP | Intellectual Property Attorneys and Solicitors, UK and Europe','about_eip/people/!rosie_hardy': '!rosie Hardy | People | About EIP | Intellectual Property Attorneys and Solicitors, UK and Europe','about_eip/people/adam_flint': 'Adam Flint | People | About EIP | Intellectual Property Attorneys and Solicitors, UK and Europe','about_eip/people/alice_mastrovito': 'Alice Mastrovito | People | About EIP | Intellectual Property Attorneys and Solicitors, UK and Europe','about_eip/people/andrew_samm': 'Andrew Samm | People | About EIP | Intellectual Property Attorneys and Solicitors, UK and Europe','about_eip/people/andrew_sharples': 'Andrew Sharples | People | About EIP | Intellectual Property Attorneys and Solicitors, UK and Europe','about_eip/people/ben_hoyle': 'Ben Hoyle | People | About EIP | Intellectual Property Attorneys and Solicitors, UK and Europe','about_eip/people/chris_price': 'Chris Price | People | About EIP | Intellectual Property Attorneys and Solicitors, UK and Europe','about_eip/people/darren_smyth': 'Darren Smyth | People | About EIP | Intellectual Property Attorneys and Solicitors, UK and Europe','about_eip/people/derk_visser': 'Derk Visser | People | About EIP | Intellectual Property Attorneys and Solicitors, UK and Europe','about_eip/people/elizabeth_guy': 'Elizabeth Guy | People | About EIP | Intellectual Property Attorneys and Solicitors, UK and Europe','about_eip/people/emma_wilkins': 'Emma Wilkins | People | About EIP | Intellectual Property Attorneys and Solicitors, UK and Europe','about_eip/people/gareth_edwards': 'Gareth Edwards | People | About EIP | Intellectual Property Attorneys and Solicitors, UK and Europe','about_eip/people/gary_moss': 'Gary Moss | People | About EIP | Intellectual Property Attorneys and Solicitors, UK and Europe','about_eip/people/heather_mcCann': 'Heather McCann | People | About EIP | Intellectual Property Attorneys and Solicitors, UK and Europe','about_eip/people/home': 'People | More | About EIP | Intellectual Property Attorneys and Solicitors, UK and Europe','about_eip/people/iain_russell': 'Iain Russell | People | About EIP | Intellectual Property Attorneys and Solicitors, UK and Europe','about_eip/people': 'People | About EIP | Intellectual Property Attorneys and Solicitors, UK and Europe','about_eip/people/jerome_spaargaren': 'Jerome Spaargaren | People | About EIP | Intellectual Property Attorneys and Solicitors, UK and Europe','about_eip/people/john_williams': 'John Williams | People | About EIP | Intellectual Property Attorneys and Solicitors, UK and Europe','about_eip/people/matt_lawman': 'Matt Lawman | People | About EIP | Intellectual Property Attorneys and Solicitors, UK and Europe','about_eip/people/matthew_blaseby': 'Matthew Blaseby | People | About EIP | Intellectual Property Attorneys and Solicitors, UK and Europe','about_eip/people/neil_condon': 'Neil Condon | People | About EIP | Intellectual Property Attorneys and Solicitors, UK and Europe','about_eip/people/neil_forsyth': 'Neil Forsyth | People | About EIP | Intellectual Property Attorneys and Solicitors, UK and Europe','about_eip/people/paula_flutter': 'Paula Flutter | People | About EIP | Intellectual Property Attorneys and Solicitors, UK and Europe','about_eip/people/richard_pratt': 'Richard Pratt | People | About EIP | Intellectual Property Attorneys and Solicitors, UK and Europe','about_eip/people/robert_squibbs': 'Robert Squibbs | People | About EIP | Intellectual Property Attorneys and Solicitors, UK and Europe','about_eip/people/robin_rickard': 'Robin Rickard | People | About EIP | Intellectual Property Attorneys and Solicitors, UK and Europe','about_eip/people/sam_town': 'Sam Town | People | About EIP | Intellectual Property Attorneys and Solicitors, UK and Europe','about_eip/people/simon_maller': 'Simon Maller | People | About EIP | Intellectual Property Attorneys and Solicitors, UK and Europe','about_eip/people/stephen_scott': 'Stephen Scott | People | About EIP | Intellectual Property Attorneys and Solicitors, UK and Europe','about_eip/people/sunny_bansal': 'Sunny Bansal | People | About EIP | Intellectual Property Attorneys and Solicitors, UK and Europe','about_eip/people/vince_price': 'Vince Price | People | About EIP | Intellectual Property Attorneys and Solicitors, UK and Europe','about_eip/testimonials/home': 'Testimonials | More | About EIP | Intellectual Property Attorneys and Solicitors, UK and Europe','about_eip/testimonials': 'Testimonials | About EIP | Intellectual Property Attorneys and Solicitors, UK and Europe','brands/approach': 'EIP Brands | Approach | Intellectual Property Attorneys and Solicitors, UK and Europe','brands/contact': 'EIP Brands | Contact | Intellectual Property Attorneys and Solicitors, UK and Europe','brands/contact/practice_head': 'EIP Brands | Practice Head | Contact | Intellectual Property Attorneys and Solicitors, UK and Europe','brands/expertise': 'EIP Brands | Expertise | Intellectual Property Attorneys and Solicitors, UK and Europe','brands/testimonials': 'EIP Brands | Testimonials | Intellectual Property Attorneys and Solicitors, UK and Europe','careers': 'Join the experts | Careers at EIP |Intellectual Property Attorneys and Solicitors, UK and Europe','careers/life': 'Join the experts | Careers at EIP |Intellectual Property Attorneys and Solicitors, UK and Europe','careers/_notes/dwsyn': '','careers_at_eip/attorneys_and_associates/home': 'Attorneys and Associates | More | Careers at EIP | Intellectual Property Attorneys and Solicitors, UK and Europe','careers_at_eip/attorneys_and_associates': 'Attorneys and Associates | Careers at EIP | Intellectual Property Attorneys and Solicitors, UK and Europe','careers_at_eip/employment_policy': 'Employment Policy | Careers at EIP | Intellectual Property Attorneys and Solicitors, UK and Europe','careers_at_eip/new_to_the_ip_profession/home': 'New To The Ip Profession | More | Careers at EIP | Intellectual Property Attorneys and Solicitors, UK and Europe','careers_at_eip/new_to_the_ip_profession': 'New To The Ip Profession | Careers at EIP | Intellectual Property Attorneys and Solicitors, UK and Europe','careers_at_eip/support_staff': 'Support Staff | Careers at EIP | Intellectual Property Attorneys and Solicitors, UK and Europe','chinese/special_chinese/home': '中文 | 公司简介 | More | Intellectual Property Attorneys and Solicitors, UK and Europe','chinese/special_chinese': '中文 | 公司简介 | Intellectual Property Attorneys and Solicitors, UK and Europe','chinese/special_chinese_contact': '中文 | 联系方式 | Intellectual Property Attorneys and Solicitors, UK and Europe','designs/approach': 'EIP Designs | Approach | Intellectual Property Attorneys and Solicitors, UK and Europe','designs/contact': 'EIP Designs | Contact | Intellectual Property Attorneys and Solicitors, UK and Europe','designs/contact/practice_head': 'EIP Designs | Practice Head | Contact | Intellectual Property Attorneys and Solicitors, UK and Europe','designs/expertise': 'EIP Designs | Expertise | Intellectual Property Attorneys and Solicitors, UK and Europe','designs/testimonials': 'EIP Designs | Testimonials | Intellectual Property Attorneys and Solicitors, UK and Europe','digital/approach': 'EIP Digital | Approach | Intellectual Property Attorneys and Solicitors, UK and Europe','digital/contact': 'EIP Digital | Contact | Intellectual Property Attorneys and Solicitors, UK and Europe','digital/contact/practice_head': 'EIP Digital | Practice Head | Contact | Intellectual Property Attorneys and Solicitors, UK and Europe','digital/expertise/home': 'EIP Digital | Expertise | More | Intellectual Property Attorneys and Solicitors, UK and Europe','digital/expertise': 'EIP Digital | Expertise | Intellectual Property Attorneys and Solicitors, UK and Europe','digital/expertise/uk': 'EIP Digital | Uk | Expertise | Intellectual Property Attorneys and Solicitors, UK and Europe','digital/expertise/uk_business': 'EIP Digital | Uk Business | Expertise | Intellectual Property Attorneys and Solicitors, UK and Europe','digital/expertise/uk_software': 'EIP Digital | Uk Software | Expertise | Intellectual Property Attorneys and Solicitors, UK and Europe','digital/expertise/world': 'EIP Digital | World | Expertise | Intellectual Property Attorneys and Solicitors, UK and Europe','digital/testimonials': 'EIP Digital | Testimonials | Intellectual Property Attorneys and Solicitors, UK and Europe','dynamics/approach': 'EIP Dynamics | Approach | Intellectual Property Attorneys and Solicitors, UK and Europe','dynamics/contact': 'EIP Dynamics | Contact | Intellectual Property Attorneys and Solicitors, UK and Europe','dynamics/contact/practice_head': 'EIP Dynamics | Practice Head | Contact | Intellectual Property Attorneys and Solicitors, UK and Europe','dynamics/expertise': 'EIP Dynamics | Expertise | Intellectual Property Attorneys and Solicitors, UK and Europe','dynamics/testimonials': 'EIP Dynamics | Testimonials | Intellectual Property Attorneys and Solicitors, UK and Europe','elements/approach': 'EIP Elements | Approach | Intellectual Property Attorneys and Solicitors, UK and Europe','elements/contact': 'EIP Elements | Contact | Intellectual Property Attorneys and Solicitors, UK and Europe','elements/contact/practice_head': 'EIP Elements | Practice Head | Contact | Intellectual Property Attorneys and Solicitors, UK and Europe','elements/expertise': 'EIP Elements | Expertise | Intellectual Property Attorneys and Solicitors, UK and Europe','elements/testimonials': 'EIP Elements | Testimonials | Intellectual Property Attorneys and Solicitors, UK and Europe','green/approach': 'EIP Green | Approach | Intellectual Property Attorneys and Solicitors, UK and Europe','green/contact': 'EIP Green | Contact | Intellectual Property Attorneys and Solicitors, UK and Europe','green/contact/practice_head': 'EIP Green | Practice Head | Contact | Intellectual Property Attorneys and Solicitors, UK and Europe','green/expertise': 'EIP Green | Expertise | Intellectual Property Attorneys and Solicitors, UK and Europe','green/fast-track': 'EIP Green | Fast-track | Intellectual Property Attorneys and Solicitors, UK and Europe','green/testimonials': 'EIP Green | Testimonials | Intellectual Property Attorneys and Solicitors, UK and Europe','information_for_foreign_attorneys/experience': 'Experience | Information For Foreign Attorneys | EIP | Intellectual Property Attorneys and Solicitors, UK and Europe','information_for_foreign_attorneys/international_contact': 'International Contact | Information For Foreign Attorneys | EIP | Intellectual Property Attorneys and Solicitors, UK and Europe','information_for_foreign_attorneys/philosophy/home': 'Philosophy | More | Information For Foreign Attorneys | EIP | Intellectual Property Attorneys and Solicitors, UK and Europe','information_for_foreign_attorneys/philosophy': 'Philosophy | Information For Foreign Attorneys | EIP | Intellectual Property Attorneys and Solicitors, UK and Europe','information_for_foreign_attorneys/services/home': 'Services | More | Information For Foreign Attorneys | EIP | Intellectual Property Attorneys and Solicitors, UK and Europe','information_for_foreign_attorneys/services': 'Services | Information For Foreign Attorneys | EIP | Intellectual Property Attorneys and Solicitors, UK and Europe','japanese/special_japanese/home': '日本語 | 事務所概要 | More | Intellectual Property Attorneys and Solicitors, UK and Europe','japanese/special_japanese': '日本語 | 事務所概要 | Intellectual Property Attorneys and Solicitors, UK and Europe','japanese/special_japanese_contact': '日本語 | 連絡先 | Intellectual Property Attorneys and Solicitors, UK and Europe','korean/special_korean/home': '한국어 | 회사소개 | More | Intellectual Property Attorneys and Solicitors, UK and Europe','korean/special_korean': '한국어 | 회사소개 | Intellectual Property Attorneys and Solicitors, UK and Europe','korean/special_korean_contact': '한국어 | 연락처 | Intellectual Property Attorneys and Solicitors, UK and Europe','legal/approach': 'EIP Legal | Approach | Intellectual Property Attorneys and Solicitors, UK and Europe','legal/contact': 'EIP Legal | Contact | Intellectual Property Attorneys and Solicitors, UK and Europe','legal/contact/practice_head': 'EIP Legal | Practice Head | Contact | Intellectual Property Attorneys and Solicitors, UK and Europe','legal/expertise': 'EIP Legal | Expertise | Intellectual Property Attorneys and Solicitors, UK and Europe','legal/testimonials': 'EIP Legal | Testimonials | Intellectual Property Attorneys and Solicitors, UK and Europe','life/approach': 'EIP Life | Approach | About EIP Life | Intellectual Property Attorneys and Solicitors, UK and Europe','life/contact': 'EIP Life | Contact | About EIP Life | Intellectual Property Attorneys and Solicitors, UK and Europe','life/contact/practice_head': 'EIP Life | Practice Head | Contact | About EIP Life | Intellectual Property Attorneys and Solicitors, UK and Europe','life/expertise': 'EIP Life | Expertise | About EIP Life | Intellectual Property Attorneys and Solicitors, UK and Europe','life/testimonials': 'EIP Life | Testimonials | About EIP Life | Intellectual Property Attorneys and Solicitors, UK and Europe','life_careers/introduction/home': 'EIP Life | Introduction | More | Careers at EIP Life | Intellectual Property Attorneys and Solicitors, UK and Europe','life_careers/introduction': 'EIP Life | Introduction | Careers at EIP Life | Intellectual Property Attorneys and Solicitors, UK and Europe','life_careers/working_for_us': 'EIP Life | Working For Us | Careers at EIP Life | Intellectual Property Attorneys and Solicitors, UK and Europe','regulatory/contact': 'Contact | Regulatory | Intellectual Property Attorneys and Solicitors, UK and Europe','regulatory/information': 'information | Regulatory | Intellectual Property Attorneys and Solicitors, UK and Europe','search/approach': 'EIP Search | Approach | Intellectual Property Attorneys and Solicitors, UK and Europe','search/contact': 'EIP Search | Contact | Intellectual Property Attorneys and Solicitors, UK and Europe','search/contact/practice_head': 'EIP Search | Practice Head | Contact | Intellectual Property Attorneys and Solicitors, UK and Europe','search/expertise': 'EIP Search | Expertise | Intellectual Property Attorneys and Solicitors, UK and Europe','search/testimonials': 'EIP Search | Testimonials | Intellectual Property Attorneys and Solicitors, UK and Europe','strategy/approach': 'EIP Strategy | Approach | Intellectual Property Attorneys and Solicitors, UK and Europe','strategy/contact': 'EIP Strategy | Contact | Intellectual Property Attorneys and Solicitors, UK and Europe','strategy/contact/practice_head': 'EIP Strategy | Practice Head | Contact | Intellectual Property Attorneys and Solicitors, UK and Europe','strategy/expertise': 'EIP Strategy | Expertise | Intellectual Property Attorneys and Solicitors, UK and Europe','strategy/patent_box': 'EIP Strategy | Patent Box | Intellectual Property Attorneys and Solicitors, UK and Europe','strategy/testimonials': 'EIP Strategy | Testimonials | Intellectual Property Attorneys and Solicitors, UK and Europe','about_eip': 'Approach | About EIP | Intellectual Property Attorneys and Solicitors, UK and Europe','': 'Approach | About EIP | Intellectual Property Attorneys and Solicitors, UK and Europe','brands': 'EIP Brands | Approach | Intellectual Property Attorneys and Solicitors, UK and Europe','designs': 'EIP Designs | Approach | Intellectual Property Attorneys and Solicitors, UK and Europe','digital': 'EIP Digital | Approach | Intellectual Property Attorneys and Solicitors, UK and Europe','dynamics': 'EIP Dynamics | Approach | Intellectual Property Attorneys and Solicitors, UK and Europe','elements': 'EIP Elements | Approach | Intellectual Property Attorneys and Solicitors, UK and Europe','green': 'EIP Green | Approach | Intellectual Property Attorneys and Solicitors, UK and Europe','legal': 'EIP Legal | Approach | Intellectual Property Attorneys and Solicitors, UK and Europe','life': 'EIP Life | Approach | About EIP Life | Intellectual Property Attorneys and Solicitors, UK and Europe','search': 'EIP Search | Approach | Intellectual Property Attorneys and Solicitors, UK and Europe','strategy': 'EIP Strategy | Approach | Intellectual Property Attorneys and Solicitors, UK and Europe'};

jQuery.cookie = function(name, value, options) {
    if (typeof value != 'undefined') { // name and value given, set cookie
        options = options || {};
        if (value === null) {
            value = '';
            options = $.extend({}, options); // clone object since it's unexpected behavior if the expired property were changed
            options.expires = -1;
        }
        var expires = '';
        if (options.expires && (typeof options.expires == 'number' || options.expires.toUTCString)) {
            var date;
            if (typeof options.expires == 'number') {
                date = new Date();
                date.setTime(date.getTime() + (options.expires * 24 * 60 * 60 * 1000));
            } else {
                date = options.expires;
            }
            expires = '; expires=' + date.toUTCString(); // use expires attribute, max-age is not supported by IE
        }
        // NOTE Needed to parenthesize options.path and options.domain
        // in the following expressions, otherwise they evaluate to undefined
        // in the packed version for some reason...
        var path = options.path ? '; path=' + (options.path) : '';
        var domain = options.domain ? '; domain=' + (options.domain) : '';
        var secure = options.secure ? '; secure' : '';
        document.cookie = [name, '=', encodeURIComponent(value), expires, path, domain, secure].join('');
    } else { // only name given, get cookie
        var cookieValue = null;
        if (document.cookie && document.cookie != '') {
            var cookies = document.cookie.split(';');
            for (var i = 0; i < cookies.length; i++) {
                var cookie = jQuery.trim(cookies[i]);
                // Does this cookie string begin with the name we want?
                if (cookie.substring(0, name.length + 1) == (name + '=')) {
                    cookieValue = decodeURIComponent(cookie.substring(name.length + 1));
                    break;
                }
            }
        }
        return cookieValue;
    }
};

function showHTML(){
	$.cookie('showHTML', 1, { path: '/' })
	var c = $.cookie('showHTML');
	if(c != 1){
		alert("You must enable Cookies in your browser to view the HTML");
		return false;
	}

	var l = window.location.href.toString();
	var a = l.split('#')[1];
	var b = l.split('/')[2];
	window.location.href = "http://" + b + (a?a:"");

	return false;
}

function showFlash(args){
	$.cookie('showHTML', 0, { path: '/' });
	var c = $.cookie('showHTML');
//			if(c != 0) alert("You must enable Cookies in your browser to view the HTML");
	var l = window.location.href.toString();
	var b = l.split('/')[2];
	if(args.length > 0){
		window.location.href = "http://" + b + "/" + args; 	
	}else{
		window.location.reload(true);
	}
	return false;			
}

function printHTML(args){

	var l = window.location.href.toString();	
	if(args && args.length > 0){
		var b = l.split('/')[2];
		var url = "http://" + b + "/" + args + "?print=1"; 	
	}else{
		var a = l.split('#')[1];
		var b = l.split('/')[2];
		var url = "http://" + b + (a ? a : '/') + "?print=1";
	}
		
	popUp(url);
}

function popUp(URL) {
	day = new Date();
	id = day.getTime();
	eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,width=600,height=400');");
}

function printPage(){
	window.print();
	window.close();
}

function showTrigger(toggle,args){
	if(!hasFlash()) return;
	if(toggle){
		document.write('<a href="#"  onclick="return showFlash(\''+args+'\');">Show full site</a>');		
	}else{
		document.write('<a href="#" onclick="return showHTML();">Show simple site</a>');
	}
}

function hasFlash(){
	var version = swfobject.getFlashPlayerVersion();
	return (version.major  >= 8);	
}

function getTitle($page){
	if($page.substr(0,1) == "/") $page = $page.substr(1);
	return titles[$page];
}
	
	
function submitNicEdit(d){
	try{
		for(var e in nicEditors.editors){
			for(var i in nicEditors.editors[e].nicInstances) nicEditors.editors[e].nicInstances[i].saveContent();	
		}
	}catch(e){
		
	}
}

function setup_sortable(className,url){
	$("." + className).sortable({
		items:"li",
		axis: 'y',
		scroll:true,
		axis: 'y',
		stop: function(){sort_complete($(this),url)}
	});
	$("." +  className).disableSelection();
}

function sort_complete(info,url){
	var order =info.sortable('toArray').toString();
	$.ajax({
		type: "POST",
		url: url,
		data: "order="+order,
		success: function(msg){
		}
	});
}

