/*window.onload = function(){
	if (CmsEditorActive==true) {
		var link = document.getElementsByTagName('a');
		for (var i=0; i<link.length; i++) {
			link[i].href="javascript:noLink();";
		}
	}	
}
function noLink(){
	return;
}*/

//left en right oa gebruikt in showimg en mid

function Left(str, n){
	if (n <= 0)
	    return "";
	else if (n > String(str).length)
	    return str;
	else
	    return String(str).substring(0,n);
}
function Right(str, n){
    if (n <= 0)
       return "";
    else if (n > String(str).length)
       return str;
    else {
       var iLen = String(str).length;
       return String(str).substring(iLen, iLen - n);
    }
}

function Mid(str, start, len) {
// Make sure start and len are within proper bounds
    if (start < 0 || len < 0) return "";
    var iEnd, iLen = String(str).length;
    if (start + len > iLen)
          iEnd = iLen;
    else
          iEnd = start + len;
    return String(str).substring(start,iEnd);
}

//CmsEditorActive
try {
	if (CmsEditorActive!=true) {}
}
catch (err) {
	var CmsEditorActive=false
}

/*
function redirect() {
	if (CmsEditorActive!=true) {
		switch(location.hostname){
		case 'verfwinkel.nl':
			document.write ('Verfwinkel.nl is bereikbaar via <a href="http://www.verfwinkel.nl">www.verfwinkel.nl</a>.');
			//window.location = "http://www.verfwinkel.nl";
			break;
		//	location.hostname='www.verfwinkel.nl';
		//	break;
		case 'www.babyplaza-echt.nl':
		case 'www.babyplaza-roermond.nl':
			location.hostname='www.mienpropke.nl';
			break;
		case 'www.bunnyjuwelier.nl':
			location.hostname='www.luckyyoufashion.nl';
			break;
		case 'www.gpprijsvraag.nl':
			location.href='http://www.gpinstitutes.nl/over_gp_benelux/prijsvraag.html';
			break;
		case 'www.stockholmfashion.eu':
		case 'stockholmfashion.eu':
		case 'www.stockholmcollections.eu':
		case 'stockholmcollections.eu':
		case 'www.stockholmkids.nl':
		case 'stockholmkids.nl':
			location.hostname='www.stockholmfashion.nl';
			break;
		case 'vanbavel-bouw.nl':
		case 'www.vanbavel-bouw.nl':
			location.hostname='www.charobouw.nl';
			break;
		case 'www.cms.paradesk.nl':
			location.hostname='cms.paradesk.nl';
			break;
		case 'bybeagle.com':
		case 'www.bybeagle.com':
			location.hostname='www.bybeagle.nl';
			break;
		case 'www.deolijftak.nl':
			location.hostname = 'www.deolijftak.eu';
			break;
		case 'www.villa-kinderkleding.nl':
		case 'villa-kinderkleding.nl':
		case 'pippishop.nl':
		case 'www.pippishop.nl':
			location.hostname = 'www.villakakelbont-jeugdmode.nl';
			break;
		case 'slimleven.nl':
		case 'deslimstewoning.nl':
		case 'slimwerken.nl':
		case 'smart-home.nl':
		case 'domoticadiensten.nl':
		case 'domoticawoning.nl':
		case 'domoticasystemen.nl':
		case 'slim-leven.nl':
		case 'woongemak.nl':
		case 'aalnederland.nl':
		case 'aal-nederland.nl':
		case 'smarthomes.nl':
		case 'domoticaleveranciers.nl':
		case 'domoticastartpagina.nl':
		case 'smarthomesmagazine.nl':
		case 'smarthomesmagazine.be':
		case 'aalnederland.eu':
		case 'aal-nederland.eu':
		case 'smarthomesmagazine.eu':
		case 'smarthomes.nu':
		case 'smart-homes.org':
		case 'smart-homes.info':
		case 'www.slimleven.nl':
		case 'www.deslimstewoning.nl':
		case 'www.slimwerken.nl':
		case 'www.smart-home.nl':
		case 'www.domoticadiensten.nl':
		case 'www.domoticawoning.nl':
		case 'www.domoticasystemen.nl':
		case 'www.slim-leven.nl':
		case 'www.woongemak.nl':
		case 'www.aalnederland.nl':
		case 'www.aal-nederland.nl':
		case 'www.smarthomes.nl':
		case 'www.domoticaleveranciers.nl':
		case 'www.domoticastartpagina.nl':
		case 'www.smarthomesmagazine.nl':
		case 'www.smarthomesmagazine.be':
		case 'www.aalnederland.eu':
		case 'www.aal-nederland.eu':
		case 'www.smarthomesmagazine.eu':
		case 'www.smarthomes.nu':
		case 'www.smart-homes.org':
		case 'www.smart-homes.info':
			location.hostname = 'www.smart-homes.nl';
			break;
        case 'domoticabeurs.nl':
        case 'beursdomotica-slimwonen.nl':
        case 'beursdomotica.nl':
        case 'beursdomoticaenslimwonen.nl':
        case 'beursdomoticaslimwonen.nl':
        case 'www.domoticabeurs.nl':
        case 'www.beursdomotica-slimwonen.nl':
        case 'www.beursdomotica.nl':
        case 'www.beursdomoticaenslimwonen.nl':
        case 'www.beursdomoticaslimwonen.nl':
            location.href = 'http://www.smart-homes.nl/beursdomotica/';
            break;
		case 'www.sapphbadmode.nl':
		case 'sapphbadmode.nl':
			location.hostname = 'www.lingerie-beachwearshop.nl';
			break;
		case 'derozekoe.com':
		case 'www.derozekoe.com':
			location.hostname = 'www.derozekoe.nl';
			break;
		case 'outdoor-gear.be':
		case 'www.outdoor-gear.be':
			location.hostname = 'www.outdoor-gear.nl';
			break;
		case 'purokoffie.nl':
		case 'www.purokoffie.nl':
		case 'purolunchroom.nl':
		case 'www.purolunchroom.nl':
		case 'pure-o.nl':
		case 'www.pure-o.nl':
			location.hostname = 'www.purelunchroom.nl';
			break;
		case 'iezziegarden.com':
		case 'www.iezziegarden.com':
		case 'iezziegarden.nl':
		case 'www.iezziegarden.nl':
		case 'www.huisentuinplezier.nl':
		case 'huisentuinplezier.nl':
			location.hostname = 'www.eazygardenshop.nl';
			break;
        case 'www.lekkerkussen.be':
        case 'lekkerkussen.be':
        case 'lekkerkussen.nl':
            location.hostname = 'www.lekkerkussen.nl';
            break;
        case 'www.de-kinderwinkel.nl':
        case 'de-kinderwinkel.nl':
           	location.hostname = 'www.highlandsjunior.nl';
           	break;
        case 'www.pienjokindermode.nl':
		case 'pienjokindermode.nl':
           	location.hostname = 'www.kids-town.nl';
           	break;
		default:
			if (location.hostname.substring(0, 4)!='www.'){
				location.hostname='www.'+location.hostname;
			}
		}	
	}
}
*/

