var img=new Image();
img.src='http://www.';


function popUp() {
	window.open( "login.html", "myWindow", "status = 1, height = 480, width = 640, resizable = 0" )
}


function popUpExtranet() {
	window.open( "../login.html", "myWindow", "status = 1, height = 480, width = 640, resizable = 0" )
}




function CngBG(obj,nc){
 obj.nc=obj.className;
 obj.className=nc;
 obj.onmouseout=function(){ this.className=this.nc; }
}


function popUpWindow(url, width, height, resizable, scrollbars){
	if (arguments.length == 1){
		width = 335;
		height = 370;
		resizable = "yes";
		scrollbars = "yes";
	}else if (arguments.length == 3){
		resizable = "no";
		scrollbars = "no";
	}else if (arguments.length == 4){
		scrollbars = "no";
	}

	var win = window.open(url, "PopUp", "width=" + width + ",height=" + height + ",resizable=" + resizable + ",scrollbars=" + scrollbars + ",menubar=no,toolbar=no,left=20,top=20");
}

<!--
function MM_preloadimages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadimages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

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;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

// Random Image Generator
var image = new Array(
	'21',
	'21',
	'21'
);

var n = image.length;

function RandomImage() {
    return(image[Math.floor(Math.random()*n)]);
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function rollon() {
el = event.srcElement ;
if (el.getAttribute("roll") != null) {
el.className = "onit" ;
}
}

function rolloff() {
el = event.srcElement ;
if (el.getAttribute("roll") != null) {
el.className = "offit";
}
}

document.onmouseover = rollon ;
document.onmouseout = rolloff ;
function launchWindow(url) {
	window.open(url, "_blank", "height=480,width=480,left=80,top=80,resizable=1,toolbar=1,scrollbars=yes");
}
function loadFooter(){
	document.write(" <div id='footer'><div id='footertxt'><a href='index.html' class='footerLink'>home</a> | <a href='about.html' class='footerLink'>about</a> | <a href='bulk-cd-replication-bulk-dvd-replication.html' class='footerLink'>media &amp; software</a> | <a href='distribution.html' class='footerLink'>distribution</a> | <a href='promotions.html' class='footerLink'>promotions</a> | <a href='printing.html' class='footerLink'>design/printing</a> | <a href='contact.html' class='footerLink'>contact</a> | <a href='extranet.html' class='footerLink'>client extranet</a><br><br>1721 Westbelt Drive &nbsp;&nbsp;&nbsp; Columbus, OH 43228 &nbsp;&nbsp;&nbsp; phone 614-876-5836 &nbsp;&nbsp;&nbsp; fax 614-876-8132    </div></div>");
}
function loadFooterSub(){
	document.write(" <div id='footerSub'><div id='footertxtSub'><a href='index.html' class='footerLink'>home</a> | <a href='about.html' class='footerLink'>about</a> | <a href='bulk-cd-replication-bulk-dvd-replication.html' class='footerLink'>media &amp; software</a> | <a href='distribution.html' class='footerLink'>distribution</a> | <a href='promotions.html' class='footerLink'>promotions</a> | <a href='printing.html' class='footerLink'>design/printing</a> | <a href='contact.html' class='footerLink'>contact</a> | <a href='extranet.html' class='footerLink'>client extranet</a><br>");
	document.write("1721 Westbelt Drive &nbsp;&nbsp;&nbsp; Columbus, OH 43228 &nbsp;&nbsp;&nbsp; phone 614-876-5836 &nbsp;&nbsp;&nbsp; fax 614-876-8132    </div></div>");
}

function loadFooterExtranet(){
	document.write(" <div id='footerSub'><div id='footertxtSub'><a href='../' class='footerLink'>home</a> | <a href='../about.html' class='footerLink'>about</a> | <a href='../bulk-cd-replication-bulk-dvd-replication.html' class='footerLink'>media &amp; software</a> | <a href='../distribution.html' class='footerLink'>distribution</a> | <a href='../promotions.html' class='footerLink'>promotions</a> | <a href='../printing.html' class='footerLink'>design/printing</a> | <a href='../contact.html' class='footerLink'>contact</a> | <a href='../extranet.html' class='footerLink'>client extranet</a><br>");
	document.write("1721 Westbelt Drive &nbsp;&nbsp;&nbsp; Columbus, OH 43228 &nbsp;&nbsp;&nbsp; phone 614-876-5836 &nbsp;&nbsp;&nbsp; fax 614-876-8132    </div></div>");
}

function verify(){
		err = 0;
		frm = document.login;
		if (frm.username.value == "") {
			alert("You must enter a username before logging in!");
			err += 1;
		}
		if (frm.password.value == "") {
			alert("You must enter a password before logging in!");
			err += 1;
		}
		if (err == 0) {
			frm.submit();
			return true;
		}
	}
	
	
function loadNavExtranet(section) {
	document.write("<ul id='main-nav'>");
	document.write("<li id='about-nav'><a href='../about.html'>About</a></li>");
	document.write("<li id='software-nav'><a href='../bulk-cd-replication-bulk-dvd-replication.html'>Software/Media</a></li>");
	document.write("<li id='distribution-nav'><a href='../distribution.html'>Distribution</a></li>");
	document.write("<li id='promotions-nav'><a href='../promotions.html'>Promotions</a></li>");
	document.write("<li id='printing-nav'><a href='../printing.html'>Design/Printing</a></li>");
	document.write("<li id='contact-nav'><a href='../contact.html'>Contact</a></li>");
    document.write("</ul> ");


} // end function loadNavExtranet


function loadNav(section) {
	document.write("<ul id='main-nav'>");
	if (section == "about") {
	    document.write("<li id='about-nav-on'><a href='about.html'>About</a></li>");
	} else {
	    document.write("<li id='about-nav'><a href='about.html'>About</a></li>");
	}
	if (section == "software") {
		document.write("<li id='software-nav-on'><a href='bulk-cd-replication-bulk-dvd-replication.html'>Software/Media</a></li>");
	} else {
		document.write("<li id='software-nav'><a href='bulk-cd-replication-bulk-dvd-replication.html'>Software/Media</a></li>");
	}
	if (section == "distribution") {
		document.write("<li id='distribution-nav-on'><a href='distribution.html'>Distribution</a></li>");
	} else {
		document.write("<li id='distribution-nav'><a href='distribution.html'>Distribution</a></li>");
	}
	if (section == "promotions") {
		document.write("<li id='promotions-nav-on'><a href='promotions.html'>Promotions</a></li>");
	} else {
		document.write("<li id='promotions-nav'><a href='promotions.html'>Promotions</a></li>");
	}
	if (section == "printing") {
		document.write("<li id='printing-nav-on'><a href='printing.html'>Design/Printing</a></li>");
	} else {
		document.write("<li id='printing-nav'><a href='printing.html'>Design/Printing</a></li>");
	}
	if (section == "contact") {
		document.write("<li id='contact-nav-on'><a href='contact.html'>Contact</a></li>");
	} else {
		document.write("<li id='contact-nav'><a href='contact.html'>Contact</a></li>");
	}
    document.write("</ul> ");


} // end function loadNav


// The function that does the image-swap
function chgImg(path,section,state) {
	if (getAppVersion()) {
		document[section].src = path + section + "_" + state + ".gif"; 
	}
} // end function chgImg


// The function to sniff out a browser that can do image-swaps
function getAppVersion(){
	appname= navigator.appName;
	var appversion = navigator.appVersion;
	majorver = appversion.substring(0, 1);
	if ( (appname == "Netscape") && ( majorver >= 3 ) ) return 0;
	if ( (appname == "Microsoft Internet Explorer") && (majorver >= 4) ) return 1;
	return -1;
} // end function getAppVersion

getAppVersion();



function show() {
stra = window.location.search.substr(1).split("&"); 
where = stra[0].split("=");
return where[1];
}


function changeIt()
{
	// Ref: http://www.quirksmode.org/dom/changess.html
	if (!document.styleSheets) return;
	var theRules = new Array();
	if (document.styleSheets[1].cssRules)
		theRules = document.styleSheets[1].cssRules
	else if (document.styleSheets[1].rules)
		theRules = document.styleSheets[1].rules
	else return;
	theRules[theRules.length-1].style.backgroundColor = 'transparent';
	//document.styleSheets[0].previewTable.style.setProperty('background','#00cc00',null);
}





function get_preview(font_size) {

	newText = document.createfrm.gtext.value; 
	var re = new RegExp ('\n', 'gi') ;
	var newText = newText.replace(re, 'chr(13)') ;
	//$text=wordwrap($text,$wrappos,"\n\r",0);
	
	newCredit = document.createfrm.qcredit.value;
	
	newBgColor = document.createfrm.bgColor.value; 
	newBgColor = newBgColor.substring(1, newBgColor.length); 

	newTextColor = document.createfrm.textColor.value; 
	newTextColor = newTextColor.substring(1, newTextColor.length); 
	
	newgwidth = document.createfrm.gwidth.value; 
	newgheight = document.createfrm.gheight.value; 
	
	newImg = 'phpimage.php?text='+newText+'   &font_file=' + document.createfrm.font.options[document.createfrm.font.selectedIndex].value + '&font_size='+ font_size +'&font_color='+ newTextColor +'&background_color=' + newBgColor; 
	document.preview.src = newImg;
	
}

//document.getElementById(id).style.visibility; 

function visibilityToggle(id) { 
 var el = document.getElementById(id).style; 
 if(el.visibility == "hidden") { 
 el.visibility = "visible"; 
 } 
 else if(el.visibility == "visible") { 
 el.visibility = "hidden"; 
 } 
 } 
 
 
 function displayToggle(id) { 
var el = document.getElementById(id).style; 
if(el.display == "none") { 
el.display = "block"; 
} 
else if(el.display == "block") { 
el.display = "none"; 
} 
} 

function save_filename() {
	//alert(this.value);
	filename=document.frm.file.value; 
	nameLen = filename.length; 
	lastSlashPos = filename.lastIndexOf("\\"); 
	document.frm.jpg.value = filename.substring(lastSlashPos+1, nameLen); 
	//alert('lastSlashPos:' + lastSlashPos + ' nameLen:' + nameLen + ' ' + document.frm.jpg.value);
}


//-->

