if ((navigator.appVersion.indexOf("iPhone") > 0)) {
	
	// add iphone css
	document.write('<link rel="stylesheet" type="text/css" href="/web/mobile/fw/c/iphone.css" />');

	// add hidden div to preload arrows
	document.write('<div style="display:none"><img src="http://www.cisco.com/web/mobile/fw/i/arrow-left-off.png" width="0" height="0" /></div>');
	document.write('<div style="display:none"><img src="http://www.cisco.com/web/mobile/fw/i/arrow-left-on.png" width="0" height="0" /></div>');
	document.write('<div style="display:none"><img src="http://www.cisco.com/web/mobile/fw/i/arrow-right-off.png" width="0" height="0" /></div>');
	document.write('<div style="display:none"><img src="http://www.cisco.com/web/mobile/fw/i/arrow-right-on.png" width="0" height="0" /></div>');
	document.write('<div style="display:none"><img src="http://www.cisco.com/web/mobile/fw/i/arrow-top-off.png" width="0" height="0" /></div>');
	document.write('<div style="display:none"><img src="http://www.cisco.com/web/mobile/fw/i/arrow-top-on.png" width="0" height="0" /></div>');

	// stop phone number links
	var iphoneTag = document.createElement("meta");
	iphoneTag.name = "format-detection";
	iphoneTag.content = "telephone=no";
	document.getElementsByTagName("head")[0].appendChild(iphoneTag);

	// set viewort
	var iphoneTag = document.createElement("meta");
	iphoneTag.name = "viewport";
	iphoneTag.content = "width=320; initial-scale=1.0; maximum-scale=1.0; user-scalable=0";
	document.getElementsByTagName("head")[0].appendChild(iphoneTag);

	// main loader
	function dtTags() {
		
		
		// get all input tags
		var inputs = document.getElementsByTagName("input");

		// loop
		for(var i = 0; i < inputs.length; i++) {

			// set class for buttons
			if(inputs[i].type == "button" || inputs[i].type == "submit") {
				inputs[i].className = "input-button";
			}
			// set class for text
			else if(inputs[i].type == "text") {
				inputs[i].className = "input-text";
			}
		}

		// get all dt tags
		var dt = document.getElementsByTagName("dt");
		
		// loop
		for(var i = 0; i < dt.length; i++) { 
			
			// add touch/mouse events to change classes
			dt[i].addEventListener("touchstart", function(){this.className = "hover";}, false); 
			dt[i].addEventListener("touchcancel", function(){this.className = "";}, false);
			dt[i].addEventListener("touchend", function(){this.className = "";}, false);
			dt[i].addEventListener("mouseover", function(){this.className = "hover";}, false); 
			dt[i].addEventListener("mouseout", function(){this.className = "";}, false);

			// get inner text
			string = dt[i].innerHTML;
			
			// if back to top change image
			if (string.indexOf("[*]") != -1) {
				dt[i].style.background = "url(http://www.cisco.com/web/mobile/fw/i/arrow-top-off.png) no-repeat right center";
			}

			// if accesskey text, remove it
			if (string.indexOf("[") != -1) {
				var filter = new RegExp("[\\[][0-9*#][\\]]", "g");
				newString = string.replace(filter, "");
				dt[i].innerHTML = newString;
			}
			
			// get inner text
			string = dt[i].innerHTML;

			// if &nbsp;, remove it
			if (string.indexOf("&nbsp;") != -1) {
				newString = string.replace("&nbsp;","");
				dt[i].innerHTML = newString;
			}

			// if subtitle element, insert line break
			if (string.indexOf("<span class=\"dt-subtitle\"> - ") != -1) {
				newString = string.replace("<span class=\"dt-subtitle\"> - ","<br /><span class=\"dt-subtitle\">");
				dt[i].innerHTML = newString;
			}
			
			// to get inner link build temp element
			var container = document.createElement("div");
			container.innerHTML = dt[i].innerHTML;
			
			// get link from temp element
			var anchors = container.getElementsByTagName("a");
			
			//*****************************************************************
			//**** Added by Dominic Pelletier (dopellet@cisco.com) on 9/01/2009
			//**** This if condition needed to be added because some US pages have dt elements that doesn't contain A tags (like a title).
			if (anchors.length > 0){
				var goto = anchors[0].href;
				
				// set link to full dt element
				dt[i].setAttribute("onclick", "location.href='" + goto + "';");
			}
			
			//*****************************************************************
			//**** Added by Dominic Pelletier (dopellet@cisco.com) on 9/24/2009
			//**** Hides the dt Related Links and Learn More
			if ((dt[i].innerHTML.lastIndexOf("Related Links") != -1) || (dt[i].innerHTML.lastIndexOf("Learn More") != -1)){
				dt[i].style.display = "none";
				//document.body.removeChild(dt); //Doesn't work
				//dt[i].setAttribute("class", "relatedLinks");
				//dt[i].setAttribute("className", "relatedLinks"); 
			}
		}
		
		
		
		//*****************************************************************
		//**** Added by Dominic Pelletier (dopellet@cisco.com) on 9/15/2009
		//**** Counts the characters within the H3 to define how much height we should assign to fw-header so the title fits in it
		var oP = document.body.getElementsByTagName("h3")[0];
		//oP.innerHTML = "WWWWWWWWWWWWWWW WWWWWWWWWWWWWWW WWWWWWWWWWWWWWW";
		if (typeof(oP)!="undefined"){
			if (oP.offsetHeight > 0){
				//alert(oP.offsetHeight);
				var headerHeight = 45 + oP.offsetHeight + 5;
				document.getElementById("fw-header").style.height = headerHeight + "px";
			}	
		}
				
		
		// display all main divs
		if (document.getElementById("fw-content")) {
			document.getElementById("fw-content").style.display = "block";
		}
		if (document.getElementById("fw-lownav")) {
			document.getElementById("fw-lownav").style.display = "block";
		}
		if (document.getElementById("fw-footer")) {
			document.getElementById("fw-footer").style.display = "block";
		}
				

		// hide window top
		window.scrollTo(0, 1);
	}

	//window.onload = dtTags; //Commented out because it doesn't work in Firefox for testing/debugging purposes
	if (window.attachEvent) {window.attachEvent('onload', dtTags);}
	else if (window.addEventListener) {window.addEventListener('load', dtTags, false);}
	else {document.addEventListener('load', dtTags, false);} 
}