function contactus() {
window.open('http://www.econsumeraffairs.com/am_bev/contactus.htm?F1=dietrite&F2=Diet_Rite','','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=700,height=500,left=0,top=0');
}
function policies() {
window.open('http://www.dpsunews.com/privacy.aspx?s=DR','','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=692,height=500,left=0,top=0');
}
function termsofuse() {
window.open('http://www.dpsunews.com/termsofuse.aspx','','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=692,height=500,left=0,top=0');
}
function join() {
window.open('Registration/Web/UserInformation.aspx','','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=692,height=600,left=0,top=0');
}
function yearsupply() {
window.open('YearSupply05/web/UserInformation.aspx','','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=692,height=600,left=0,top=0');
}
function pressRelease08152005() {
var w = 628;
var h = 600;
var x = ((screen.width-w)/2);
var y = ((screen.height-h)/2);
window.open('pressrelease08152005/index.aspx','','screenx='+x+',screeny='+y+',left='+x+',top='+y+',width='+w+',height='+h+',scrollbars=yes,resizable=yes,toolbar=no');
}

function pressRelease12012006() {
var w = 650;
var h = 600;
var x = ((screen.width-w)/2);
var y = ((screen.height-h)/2);
window.open('pressrelease12012006/index.aspx','','screenx='+x+',screeny='+y+',left='+x+',top='+y+',width='+w+',height='+h+',scrollbars=yes,resizable=yes,toolbar=no');
}

function contestRules(){
var w = 650;
var h = 600;
var x = ((screen.width-w)/2);
var y = ((screen.height-h)/2);
window.open('officialRules/index.aspx','','screenx='+x+',screeny='+y+',left='+x+',top='+y+',width='+w+',height='+h+',scrollbars=yes,resizable=yes,toolbar=no');
}

function openZBW() {
var w = 900;
var h = 660;
var x = ((screen.width-w)/2);
var y = ((screen.height-h)/2);
window.open('2006ZeroBoundariesWoman/index.aspx','','screenx='+x+',screeny='+y+',left='+x+',top='+y+',width='+w+',height='+h+',scrollbars=yes,resizable=yes,toolbar=yes');
}
function openDiabetes() {
openThirdParty('http://www.diabetes.org');
//window.open('http://www.diabetes.org','','toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes,width=850,height=650,left=0,top=0');
}

/*below block will center a popup*/
function exampleCenterPopup() {
var w = 600;
var h = 600;
var x = ((screen.width-w)/2);
var y = ((screen.height-h)/2);
window.open('urlToOpenhere.aspx','','screenx='+x+',screeny='+y+',left='+x+',top='+y+',width='+w+',height='+h);
}



/* pop-up SCRIPT-----
** The below block is fires on inital load of the page.
*/
function PageURL(q) {
	if(q.length > 1) this.q = q.substring(1, q.length);
	else this.q = null;
	this.valueHits = new Array();
	if(q) {
	    for(var i=0; i < this.q.split("&").length; i++) {
	    this.valueHits[i] = this.q.split("&")[i];
    }
}
this.getValueHits = function() { return this.valueHits; }
this.getValue = function(s) {
	for(var j=0; j < this.valueHits.length; j++) {
		if(this.valueHits[j].split("=")[0] == s)
		return this.valueHits[j].split("=")[1];
	}
		return false;
}
this.getParameters = function() {
	var a = new Array(this.getLength());
	for(var j=0; j < this.valueHits.length; j++) {
		a[j] = this.valueHits[j].split("=")[0];
	}
	return a;
}
this.getLength = function() { return this.valueHits.length; } 
}
function queryString(key){
	var page = new PageURL(window.location.search); 
	return unescape(page.getValue(key)); 
}
if(queryString('2006zbw')!='false') 
{
openZBW();
	
}

/* popup SCRIPT-----
*/


//function for flash alternate
function BrowserName()
{
   var bname = navigator.appName;     
   var str="";
   var str1="";
	if (bname.search(/netscape/i) == 0) // fireFox
	{
		str =  "<object classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" codebase=\"http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0\" width=\"850\" height=\"500\" id=\"main\" align=\"middle\"><param name=\"allowScriptAccess\" value=\"sameDomain\" ><param name=\"movie\" value=\"main.swf\" ><param name=\"quality\" value=\"high\" ><param name=\"scale\" value=\"noscale\" ><param name=\"bgcolor\" value=\"#161b88\" ><embed src=\"main.swf\" quality=\"high\" scale=\"noscale\" bgcolor=\"#161b88\" width=\"850\" height=\"500\" name=\"main\" align=\"middle\" allowScriptAccess=\"sameDomain\" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" /><\/object>"
   
   document.getElementById("flashData").innerHTML = str;
   
   }
   
   
   if (pluginlist.indexOf("Flash") == -1)
   {
    var sString4 = "In order to view this website you require the Flash 8 plug-in. We are currently working on providing this content to you by alternative means.";
    sString4 = sString4 + " <a href='leaving.aspx' tabindex='9'>Download Flash 8.0 Plugin<\/a>";
  
   
  
    document.getElementById("flashData").innerHTML = sString4; 
  

   }
} // End Function

