﻿<!--
function changeImages_common() {
    
    //Get current page
    var path = window.location.pathname
    //var url = window.location.protocol + "//" + window.location.host + path.substring(0, path.lastIndexOf('/') + 1);
   var url = ""
    if (window.location.hostname == "localhost")
    {
        url = window.location.protocol + "//" + window.location.host + "/iknowmed/";
    }
    else
    {
        url = window.location.protocol + "//" + window.location.host + "/";
    }
    //alert(url);

    var pageName = path.substring(path.lastIndexOf('/') + 1);
    var pageID = pageName.substring(0,pageName.lastIndexOf('.'));
    //alert(pageID)
    //alert(arguments[0])
    if (pageID == arguments[0]) {
        //return true;
    }

    if (document.images) {
	    for (var i=0; i<changeImages_common.arguments.length; i+=2) {
		    //document[changeImages_common.arguments[i]].src = changeImages_common.arguments[i+1];
		    //alert(document[changeImages_common.arguments[i]].src);
		    //document[changeImages_common.arguments[i]].src = "images/common/"+changeImages_common.arguments[i+1];
		    document[changeImages_common.arguments[i]].src = url + "images/common/"+changeImages_common.arguments[i+1];
	    }
    }
}

function displayDocuemnt(urlPath,props,height,width)
{
	var windowName = "document";
	var agent = navigator.userAgent;
	var winProps;

	switch (props)
	{
	case 0:
		winProps = "toolbar=0,menubar=0,location=0,scrollbars=1,status=0,resizable=1,titlebar=0,height="+height+",width="+width+",top=50,left=50"
		break;
	default:
		winProps = "toolbar=0,menubar=0,location=0,scrollbars=1,status=0,resizable=1,titlebar=0,height=400,width=600,top=50,left=50"
		break;
	}

	windowName = open(urlPath,windowName,winProps).focus();
}

// -->