/*
** :: GLOBAL ::
*/
var DHTML = (document.getElementById || document.all || document.layers);

function getObj(name)
{
    if (document.getElementById)
    {
        this.obj = document.getElementById(name);
        this.style = document.getElementById(name).style;
    }
    else if (document.all)
    {
        this.obj = document.all[name];
        this.style = document.all[name].style;
    }
    else if (document.layers)
    {
        this.obj = document.layers[name];
        this.style = document.layers[name];
    }
}
/*
** :: EMAIL ::
** get current page's url and attach it to GET string to be passed to
** our email-this-page script
*/
var sPath = window.location.pathname;
//var thisPage = sPath.substring(sPath.lastIndexOf('\\') + 1);
//var thisPage = sPath.substring(sPath.lastIndexOf('/') + 1);
//alert(thisPage);
var loc = '../send.php?page=';

function sendPage() {
    addUrl = loc + sPath;
    return addUrl;
}

/*
** :: PRINT ::
*/
function printPage() {
    var content = document.getElementById("col_left");
    link = "about:blank";
    var pop = window.open(link, "_new");
    pop.document.open();
    pop.document.write(content.innerHTML)
}

/*
** :: FONT ::
*/
function changeSize(size)
{
    if (!DHTML) return;
    var x = new getObj('col_left');
    x.style.fontSize = size;
}

// above not used
// below rocks

// Copyright 2003 Eddie Traversa
// http://www.dhtmlnirvana.com/
// free to use as long as this copyright notice stays intact
var tags = new Array( 'p','h3','sup','strong');
// var pixelArray =  new Array('10','12','13','14','16','18','20');
var pixelArray =  new Array('12','16','12','16','12','16','12','16','12','16','12','16','12','16','12','16','12','16','12','16','12','16','12','16','12');
var emArray =  new Array('0.7','0.9','1.0','1.5','2.0','2.5','3');
var initSize = 0;

function fontSizer(inc,unit) {
	if (!document.getElementById) 
		return;
	var size = initSize;
		size += inc;
	if (size < 0 ) {
		size = 0;
}
	if (size > 24 ) {
		size = 24;
}
		initSize = size;
		getBody = document.getElementsByTagName('body')[0];
	for (i = 0 ; i < tags.length ; i++ ) {
		getallTags = getBody.getElementsByTagName(tags[i]);
	for (k = 0 ; k < getallTags.length ; k++) 
		getallTags[k].style.fontSize = (unit=='px') ? pixelArray[size]+unit: emArray[size]+unit;
	}
}

/* font size functionality swap */

function switchView(page){
var xmlhttp=false; //Clear our fetching variable
try {
xmlhttp = new ActiveXObject('Msxml2.XMLHTTP'); //Try the first kind of active x object...
} catch (e) {
try {
xmlhttp = new ActiveXObject('Microsoft.XMLHTTP'); //Try the second kind of active x object
} catch (E) {
xmlhttp = false;
}
}
if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
xmlhttp = new XMLHttpRequest(); //If we were able to get a working active x object, start an XMLHttpRequest
}
var file = 'switchtype.php?state='; //This is the path to the file we just finished making *
xmlhttp.open('GET', file + page, true); //Open the file through GET, and add the page we want to retrieve as a GET variable **
xmlhttp.onreadystatechange=function() {
if (xmlhttp.readyState==4) { //Check if it is ready to recieve data
var content = xmlhttp.responseText; //The content data which has been retrieved ***
if( content ){ //Make sure there is something in the content variable
document.getElementById('shoeDetailRight').innerHTML = content; //Change the inner content of your div to the newly retrieved content ****
}
}
}
xmlhttp.send(null); //Nullify the XMLHttpRequest
return;
}




