
/*
CSS Browser Selector v0.3.5 (Feb 05, 2010)
Rafael Lima (http://rafael.adm.br)
http://rafael.adm.br/css_browser_selector
License: http://creativecommons.org/licenses/by/2.5/
Contributors: http://rafael.adm.br/css_browser_selector#contributors
*/
function css_browser_selector(u){var ua = u.toLowerCase(),is=function(t){return ua.indexOf(t)>-1;},g='gecko',w='webkit',s='safari',o='opera',h=document.documentElement,b=[(!(/opera|webtv/i.test(ua))&&/msie\s(\d)/.test(ua))?('ie ie'+RegExp.$1):is('firefox/2')?g+' ff2':is('firefox/3.5')?g+' ff3 ff3_5':is('firefox/3')?g+' ff3':is('gecko/')?g:is('opera')?o+(/version\/(\d+)/.test(ua)?' '+o+RegExp.$1:(/opera(\s|\/)(\d+)/.test(ua)?' '+o+RegExp.$2:'')):is('konqueror')?'konqueror':is('chrome')?w+' chrome':is('iron')?w+' iron':is('applewebkit/')?w+' '+s+(/version\/(\d+)/.test(ua)?' '+s+RegExp.$1:''):is('mozilla/')?g:'',is('j2me')?'mobile':is('iphone')?'iphone':is('ipod')?'ipod':is('mac')?'mac':is('darwin')?'mac':is('webtv')?'webtv':is('win')?'win':is('freebsd')?'freebsd':(is('x11')||is('linux'))?'linux':'','js']; c = b.join(' '); h.className += ' '+c; return c;}; css_browser_selector(navigator.userAgent);


function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

//clearing input fields start
function ClearInput(value, id){
var input = document.getElementById(id);
	if(value == input.value){
		input.value = ''; 
	}
	else{
		input.value = input.value;
	}
}
//clearing input fields end

//popUp that div start
var amID = "blank";
function showMe(containerId){
	if(amID != "blank" ){
		hideMe(amID);
	}
	if(amID != containerId){
	    amID = containerId;
	    showContainer(containerId);
	}else{
        amID = "blank";
    }
}

//popUp that div start
var amID = "blank";
function showMe(containerId,containerId2){
	if(amID != "blank" ){
		hideMe(amID);
		changeBack(amClassId);
	}
	if(amID != containerId){
	    amID = containerId;
	    showContainer(containerId);
		amClassId = containerId2;
		setClass(containerId2);
	}else{
        amID = "blank";
		amClassId = "blank";
    }
}
function showContainer(containerId){
	obj = MM_findObj(containerId);
	if (!obj) return;
	obj.style.display = 'block';
}
function hideMe(containerId){
	obj2 = MM_findObj(containerId)
	if (!obj2) return;
	obj2.style.display = 'none';
}
//popUp that div end
//change that class then back start
var amClassId = "blank";
function setClass(containerId2){
	obj = MM_findObj(containerId2);
	if (!obj) return;
	obj.className = 'active';
}
function changeBack(containerId2){
	obj2 = MM_findObj(containerId2)
	if (!obj2) return;
	obj2.className = 'question';
}
//change that class then back end

//showSubNav end
//resize_iframe start
function resize_iframe(){
    document.getElementById("sizeframe").height=80;
}
function resize_iframe2(){
    document.getElementById("sizeframe").height=180;
}
//resize_iframe end

//fake file picker start
function copyText(){
	copyText1('realFile1','fakeFile1');
}

function copyText1(orgin, destination){
	txt1 = MM_findObj(orgin);
	txt2 = MM_findObj(destination);
	
	txt2.value = txt1.value;
}
//fake file picker end


/* Light Box Z-Tuned */
function changeheight(){
	if (window.innerHeight && window.scrollMaxY) {
		var yWithScroll = window.innerHeight + window.scrollMaxY;
		var lightBoxOverlayHeight = yWithScroll;
	} else {
		var yWithScroll = document.body.scrollHeight;
		var yHeight = document.body.clientHeight;
		var lightBoxOverlayHeight = yWithScroll + yHeight;
	}

	e = MM_findObj("lightBoxOverlay");
	e.style.height = lightBoxOverlayHeight + 'px';
}

function showLB(containerId){
	obj = MM_findObj(containerId);
	if (!obj) return;
	obj.style.display = 'block';
	changeheight();
}
function showLBContent(containerId){
	showLB('lightBoxOverlay');
	obj = MM_findObj(containerId);
	if (!obj) return;
	obj.style.display = 'block';
}

function hideGallery(containerId){
	obj2 = MM_findObj(containerId)
	if (!obj2) return;
	obj2.style.display = 'none';
}

function showGallery(containerId){
	obj = MM_findObj(containerId);
	if (!obj) return;
	obj.style.display = 'block';
}

function hideLB(containerId){
	obj2 = MM_findObj(containerId)
	if (!obj2) return;
	obj2.style.display = 'none';
}


function thisMovie(movieName) {
    return document[movieName];
}
function stopAll() {
    thisMovie('popupFLV').stopReel();
}
function hideAll(){
    hideLB('lightFlash');
    hideLB('lightFLV');
	hideLB('lightBoxOverlay');
	showGallery('flashContent');
	try {
	    stopAll();
	}
	catch (e) {

	}
}
function PostBackOnReturn(event, postbackMethod) {
    if (event) {
        if (event.keyCode == 13) {
            __doPostBack(postbackMethod, '');
        }
    }
}
