var styleCounter=1;
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}

function SwapStyle(incrementVal)
	{
	
		var path;
		var newStyle;
		if (incrementVal)
			{
				styleCounter++;
			
			}
		else
			{
				styleCounter--;
			}
		if (styleCounter < 0)
			{
				styleCounter = 1;
			}
		else if (styleCounter > 3)
			{
				styleCounter = 3;
			}
	
		
		if (styleCounter == 1)
			{
				newStyle = 'rpsGroup.css';
			}
		else if (styleCounter == 2)
			{
				newStyle = 'rpsGroupMedium.css';
			}
		else if (styleCounter == 3)
			{
				newStyle = 'rpsGroupLarge.css';
			}
		
		path = '/style/'
		path += newStyle;
		
		document.getElementById('cssstyle').setAttribute('href',path);
		createCookie('rpsgroupstyle',newStyle);
		

		
	
	}

function createCookie(name, value, expires, path, domain, secure) {
  var curCookie;
  
  curCookie = name + "=" + value;
  document.cookie = curCookie;

	}
	
function LoadWindow(url,features)
	{
		var siteid;
		var sessionid;
		var tmpURL = new String();
		var RefID;
		var newAttrib;
		var attrib;
		tmpURL = '';
		siteid='<%=Request("siteid")%>';
		sessionid='<%=Request("sessionid")%>';
		RefID = '<%=request("RefID")%>';
		//newAttrib = 'scrollbars=yes,menubar=no,resizable=yes';
		//if (attrib.length > 0) {newAttrib = newAttrib + ',' + attrib}
		if(features > '')
			{
					attrib = 'scrollbars=yes,menubar=no,resizable=yes' + ',' + features;
			}
		else
			{
				attrib = 'scrollbars=yes,menubar=no,resizable=yes';
			}
		
		tmpURL = url  + '?siteid=' + siteid + '&sessionid=' + sessionid + '&RefID=' + RefID;
		window.open(tmpURL,'OpenWindow',attrib);
	}
	
	





