var fontsloaded = [];
function loadFont(objFont){
	//return true;
	var rule='';
	var fontoload='';
	var sheetDoc=document.styleSheets[0];
	var totalrules=sheetDoc.cssRules? sheetDoc.cssRules.length : sheetDoc.rules.length;
	var newSS = document.createElement('link');	newSS.rel='stylesheet'; 	newSS.type='text/css';
	//if(objFont.style.fontFamily == 'CarbonTypeRegular'){ fontoload = "CarbonTypeRegular" }
	//if(objFont.innerHTML.indexOf('CarbonTypeRegular') != -1){ fontoload = "CarbonTypeRegular" }; 
	
	//if(fontsloaded['CarbonTypeRegular']!=true){
		if(objFont.style.fontFamily == 'CarbonTypeRegular' || objFont.innerHTML.indexOf('CarbonTypeRegular') != -1){
			if(document.createStyleSheet) {
				document.createStyleSheet("cssserv.php?font=CarbonTypeRegular",totalrules-1);
			}else{
				newSS.href="cssserv.php?font=CarbonTypeRegular";	
				document.getElementsByTagName("head")[0].appendChild(newSS);
			}
			fontsloaded['CarbonTypeRegular'] = true;
		}
	//}
	
	//if(fontsloaded['BPdotsSquaresRegular']!=true){
		if(objFont.style.fontFamily == 'BPdotsSquaresRegular' || objFont.innerHTML.indexOf('BPdotsSquaresRegular') != -1){
			if(document.createStyleSheet) {
				document.createStyleSheet("cssserv.php?font=BPdotsSquaresRegular",totalrules-1);
			}else{
				newSS.href="cssserv.php?font=BPdotsSquaresRegular";	
				document.getElementsByTagName("head")[0].appendChild(newSS);
			}
			fontsloaded['BPdotsSquaresRegular'] = true;
		}
	//}

	//if(fontsloaded['DigitaldreamRegular']!=true){
		if(objFont.style.fontFamily == 'DigitaldreamRegular' || objFont.innerHTML.indexOf('DigitaldreamRegular') != -1){
			if(document.createStyleSheet) {
				document.createStyleSheet("cssserv.php?font=DigitaldreamRegular",totalrules-1);
			}else{
				newSS.href="cssserv.php?font=DigitaldreamRegular";	
				document.getElementsByTagName("head")[0].appendChild(newSS);
			}
			fontsloaded['DigitaldreamRegular'] = true;
		}
	//}
	
	//if(fontsloaded['GreyscaleBasicRegular']!=true){
		if(objFont.style.fontFamily == 'GreyscaleBasicRegular' || objFont.innerHTML.indexOf('GreyscaleBasicRegular') != -1){
			if(document.createStyleSheet) {
				document.createStyleSheet("cssserv.php?font=GreyscaleBasicRegular",totalrules-1);
				
			}else{
				newSS.href="cssserv.php?font=GreyscaleBasicRegular";	
				document.getElementsByTagName("head")[0].appendChild(newSS);
				
			}
			fontsloaded['GreyscaleBasicRegular'] = true;
		}
	//}

	//if(fontsloaded['KaratulaNormal']!=true){
		if(objFont.style.fontFamily == 'KaratulaNormal' || objFont.innerHTML.indexOf('KaratulaNormal') != -1){
			if(document.createStyleSheet) {
				document.createStyleSheet("cssserv.php?font=KaratulaNormal",totalrules-1);
			}else{
				newSS.href="cssserv.php?font=KaratulaNormal";	
				document.getElementsByTagName("head")[0].appendChild(newSS);
			}
			fontsloaded['KaratulaNormal'] = true;
			
		}
		
	//}
	
	//if(fontsloaded['UndercoverRegular']!=true){
		if(objFont.style.fontFamily == 'UndercoverRegular' || objFont.innerHTML.indexOf('UndercoverRegular') != -1){
			if(document.createStyleSheet) {
				document.createStyleSheet("cssserv.php?font=UndercoverRegular",totalrules-1);
			}else{
				newSS.href="cssserv.php?font=UndercoverRegular";	
				document.getElementsByTagName("head")[0].appendChild(newSS);
			}
			fontsloaded['UndercoverRegular'] = true;
		}
	//}

	//if(fontsloaded['CaviarDreamsRegular']!=true){
		if(objFont.style.fontFamily == 'CaviarDreamsRegular' || objFont.innerHTML.indexOf('CaviarDreamsRegular') != -1){
			if(document.createStyleSheet) {
				document.createStyleSheet("cssserv.php?font=CaviarDreamsRegular",totalrules-1);
			}else{ 
				newSS.href="cssserv.php?font=CaviarDreamsRegular";	
				document.getElementsByTagName("head")[0].appendChild(newSS);
			}
			
			fontsloaded['CaviarDreamsRegular']=true; 
		}
	//}

	//if(fontsloaded['CaviarDreamsBold']!=true){
		if(objFont.style.fontFamily == 'CaviarDreamsBold' || objFont.innerHTML.indexOf('CaviarDreamsBold') != -1){	
		
			if(document.createStyleSheet) {
				document.createStyleSheet("cssserv.php?font=CaviarDreamsBold",totalrules-1);
			}else{
				newSS.href="cssserv.php?font=CaviarDreamsBold";	
				document.getElementsByTagName("head")[0].appendChild(newSS);
			}
			fontsloaded['CaviarDreamsBold']=true;
		}
	//}
	
	if(fontsloaded['DymaxionScriptRegular']!=true){
		if(objFont.style.fontFamily == 'DymaxionScriptRegular' || objFont.innerHTML.indexOf('DymaxionScriptRegular') != -1){
			if(document.createStyleSheet) {
				document.createStyleSheet("cssserv.php?font=DymaxionScriptRegular",totalrules-1);
			}else{
				newSS.href="cssserv.php?font=DymaxionScriptRegular";	
				document.getElementsByTagName("head")[0].appendChild(newSS);
			}
			
			fontsloaded['DymaxionScriptRegular']=true;
		}
	}
	
	//if(fontsloaded['JournalRegular']!=true){
		if(objFont.style.fontFamily == 'JournalRegular' || objFont.innerHTML.indexOf('JournalRegular') != -1){
			if(document.createStyleSheet) {
				document.createStyleSheet("cssserv.php?font=JournalRegular",totalrules-1);
			}else{
				newSS.href="cssserv.php?font=JournalRegular";	
				document.getElementsByTagName("head")[0].appendChild(newSS);
			}
			fontsloaded['JournalRegular']=true;
		}
		
	//}
	
	if(objFont.style.fontFamily == 'KontrapunktLight' || objFont.innerHTML.indexOf('KontrapunktLight') != -1){
		if(document.createStyleSheet) {
			document.createStyleSheet("cssserv.php?font=KontrapunktLight",totalrules-1);
		}else{
			newSS.href="cssserv.php?font=KontrapunktLight";	
			document.getElementsByTagName("head")[0].appendChild(newSS);
		}
	}
	
	if(objFont.style.fontFamily == 'SpinCycleOTRegular' || objFont.innerHTML.indexOf('SpinCycleOTRegular') != -1){
		if(document.createStyleSheet) {
			document.createStyleSheet("cssserv.php?font=SpinCycleOTRegular",totalrules-1);
		}else{
			newSS.href="cssserv.php?font=SpinCycleOTRegular";	
			document.getElementsByTagName("head")[0].appendChild(newSS);
		}
	}
	
	if(objFont.style.fontFamily == 'WindsongRegular' || objFont.innerHTML.indexOf('WindsongRegular') != -1){
		if(document.createStyleSheet) {
			document.createStyleSheet("cssserv.php?font=WindsongRegular",totalrules-1);
		}else{
			newSS.href="cssserv.php?font=WindsongRegular";	
			document.getElementsByTagName("head")[0].appendChild(newSS);
		}
	}
	
	if(objFont.style.fontFamily == 'AndikaBasicRegular' || objFont.innerHTML.indexOf('AndikaBasicRegular') != -1){
		if(document.createStyleSheet) {
			document.createStyleSheet("cssserv.php?font=AndikaBasicRegular",totalrules-1);
		}else{
			newSS.href="cssserv.php?font=AndikaBasicRegular";	
			document.getElementsByTagName("head")[0].appendChild(newSS);
		}
	}	
	
	if(objFont.style.fontFamily == 'BPscriptRegular' || objFont.innerHTML.indexOf('BPscriptRegular') != -1){
		if(document.createStyleSheet) {
			document.createStyleSheet("cssserv.php?font=BPscriptRegular",totalrules-1);
		}else{
			newSS.href="cssserv.php?font=BPscriptRegular";	
			document.getElementsByTagName("head")[0].appendChild(newSS);
		}
	}
	
	
	if(objFont.style.fontFamily == 'DaysRegular' || objFont.innerHTML.indexOf('DaysRegular') != -1){
		if(document.createStyleSheet) {
			document.createStyleSheet("cssserv.php?font=DaysRegular",totalrules-1);
		}else{
			newSS.href="cssserv.php?font=DaysRegular";	
			document.getElementsByTagName("head")[0].appendChild(newSS);
		}
	}	
	
	if(objFont.style.fontFamily == 'GessoRegular' || objFont.innerHTML.indexOf('GessoRegular') != -1){
		if(document.createStyleSheet) {
			document.createStyleSheet("cssserv.php?font=GessoRegular",totalrules-1);
		}else{
			newSS.href="cssserv.php?font=GessoRegular";	
			document.getElementsByTagName("head")[0].appendChild(newSS);
		}
	}	
	
	
	if(objFont.style.fontFamily == 'JustOldFashionRegular' || objFont.innerHTML.indexOf('JustOldFashionRegular') != -1){
		if(document.createStyleSheet) {
			document.createStyleSheet("cssserv.php?font=JustOldFashionRegular",totalrules-1);
		}else{
			newSS.href="cssserv.php?font=JustOldFashionRegular";	
			document.getElementsByTagName("head")[0].appendChild(newSS);
		}
	}
	
	
	if(objFont.style.fontFamily == 'PlasmaDrip' || objFont.innerHTML.indexOf('PlasmaDrip') != -1){
		if(document.createStyleSheet) {
			document.createStyleSheet("cssserv.php?font=PlasmaDrip",totalrules-1);
		}else{
			newSS.href="cssserv.php?font=PlasmaDrip";	
			document.getElementsByTagName("head")[0].appendChild(newSS);
		}
	}
	
	if(objFont.style.fontFamily == 'Technique' || objFont.innerHTML.indexOf('Technique') != -1){
		if(document.createStyleSheet) {
			document.createStyleSheet("cssserv.php?font=Technique",totalrules-1);
		}else{
			newSS.href="cssserv.php?font=Technique";	
			document.getElementsByTagName("head")[0].appendChild(newSS);
		}
	}	

}
