var part1 = "information";
var part4 = "media";
var part4_1 = "&#109;&#101;&#100;&#105;&#097;&#064;&#114;&#101;&#103;&#117;&#108;&#117;&#115;&#114;&#120;&#046;&#099;&#111;&#109;";
var part5 = "busdev";
var part5_1 = "&#098;&#117;&#115;&#100;&#101;&#118;&#064;&#114;&#101;&#103;&#117;&#108;&#117;&#115;&#114;&#120;&#046;&#099;&#111;&#109;";
var part6 = "collaborations";
var part6_1 = "&#099;&#111;&#108;&#108;&#097;&#098;&#111;&#114;&#097;&#116;&#105;&#111;&#110;&#115;&#064;&#114;&#101;&#103;&#117;&#108;&#117;&#115;&#114;&#120;&#046;&#099;&#111;&#109;";
var part7 = "careers";
var part7_1 = "&#099;&#097;&#114;&#101;&#101;&#114;&#115;&#064;&#114;&#101;&#103;&#117;&#108;&#117;&#115;&#114;&#120;&#046;&#099;&#111;&#109;";
var part2 = "regulusrx.com";
//var part3 = "&#105;&#110;&#102;&#111;&#064;&#114;&#101;&#103;&#117;&#108;&#117;&#115;&#114;&#120;&#046;&#099;&#111;&#109;";
var part3 = "&#105;&#110;&#102;&#111;&#114;&#109;&#097;&#116;&#105;&#111;&#110;&#064;&#114;&#101;&#103;&#117;&#108;&#117;&#115;&#114;&#120;&#046;&#099;&#111;&#109;";




function jump (newLoc) {
	newPlace=newLoc.options[newLoc.selectedIndex].value;
	if (newPlace !="") {
		window.location.href= newPlace;
		//newWindow=window.open(newPlace);
	}
}


function togglePost(id,myHash) { //used for therapeutic areas functionality
var tID="link_"+id;
var myVar=window.location.href.split(".com");
var tPage=myVar[1].split("/");
//alert(id);
//alert(tPage[2]);

	if (tPage[1]=="therapeutic-areas") { //if already on the page
		var e = document.getElementById(tID);
		if (e.style.display == 'block') {
			e.style.display = 'none';
			if (myHash!="") {
				window.location.hash=myHash;
			}
		}
		else {
			e.style.display = 'block';
			if (myHash!="") {
				window.location.hash=myHash;
			}
		}
	}
	else {  // not on page
		//alert('going to page2');
		window.location.href='http://www.regulusrx.com/therapeutic-areas/#'+myHash;
	}	
}

function checkPage () {
//alert("check page");
var tHash=window.location.href.split("#");
//alert("dmc"+tHash[1]);
	if (tHash[1]!="") {
		if (tHash[1]=="Fibrosis") {
			togglePost(1);
			window.location.hash=tHash[1];
		}
		if (tHash[1]=="Hepatitis_C") {
			togglePost(2);
			window.location.hash=tHash[1];
		}
		if (tHash[1]=="Immuno-inflammatory") {
			togglePost(3);
			window.location.hash=tHash[1];
		}
		if (tHash[1]=="Metabolic") {
			togglePost(4);
			window.location.hash=tHash[1];
		}
		if (tHash[1]=="Oncology") {
			togglePost(5);
			window.location.hash=tHash[1];
		}
		if (tHash[1]=="Exploratory") {
			togglePost(6);
			window.location.hash=tHash[1];						
		}										
	}
}



function getStyle(oElm, strCssRule){
	var strValue = "";
	if(document.defaultView && document.defaultView.getComputedStyle){
		strValue = document.defaultView.getComputedStyle(oElm, "").getPropertyValue(strCssRule);
	}
	else if(oElm.currentStyle){
		strCssRule = strCssRule.replace(/\-(\w)/g, function (strMatch, p1){
			return p1.toUpperCase();
		});
		strValue = oElm.currentStyle[strCssRule];
	}
	return strValue;
}


function dmc() {
//alert("dmc in");
//getStyle(document.getElementById("container"), "font-size");


//alert("cleft:"+getStyle(document.getElementById("slide1"), "clip"));
//alert("cwidth:"+getStyle(document.getElementById("slide2"), "clip"));


//alert("cleft:"+getStyle(document.getElementById("slide1"), "left"));
//alert("cwidth:"+getStyle(document.getElementById("slide1"), "width"));


alert("cleft:"+getStyle(document.getElementById("conveyor"), "clip"));
alert("clip:"+getStyle(document.getElementById("conveyor-wrap"), "clip"));

//alert("ctopleft:"+getStyle(document.getElementById("conveyor-wrap"), "left"));
//alert("ctopw:"+getStyle(document.getElementById("conveyor-wrap"), "width"));




//alert("cleft:"+getStyle(document.getElementById("conveyor"), "left"));
//alert("cwidth:"+getStyle(document.getElementById("conveyor"), "width"));

//var intPosLeft = document.getElementById("conveyor").style.left;
//alert("int:"+intPosLeft);
//alert(document.getElementById("conveyor").style.left);
//$(".message").animate({"left": "-2950px"}, "slow");


//.message 
}
