function Browser(){
	var ua = navigator.userAgent.toLowerCase(); 
	this.Gecko = (ua.indexOf('gecko') != -1 && ua.indexOf('safari') == -1);
	this.Safari = (ua.indexOf('safari') != - 1);
	this.IE = (ua.indexOf('msie') != -1 && !this.Opera && (ua.indexOf('webtv') == -1) ); 
	this.Firefox = ( (ua.indexOf('firebird/') != -1) || (ua.indexOf('firefox/') != -1) );
	this.IECompatible = ( (ua.indexOf('msie') != -1) && !this.IE);
	this.NSCompatible = ( (ua.indexOf('mozilla') != -1) && !this.NS && !this.Mozilla);
	this.geckoVersion = ( (this.Gecko) ? ua.substring( (ua.lastIndexOf('gecko/') + 6), (ua.lastIndexOf('gecko/') + 14) ) : -1 );
	this.equivalentMozilla = ( (this.Gecko) ? parseFloat( ua.substring( ua.indexOf('rv:') + 3 ) ) : -1 );
	this.versionMinor = parseFloat(navigator.appVersion); 
	if (this.Gecko && !this.Mozilla) this.versionMinor = parseFloat( ua.substring( ua.indexOf('/', ua.indexOf('gecko/') + 6) + 1 ) );
	else if (this.Mozilla) this.versionMinor = parseFloat( ua.substring( ua.indexOf('rv:') + 3 ) );
	else if (this.IE && this.versionMinor >= 4) this.versionMinor = parseFloat( ua.substring( ua.indexOf('msie ') + 5 ) );
	else if (this.Safari) this.versionMinor = parseFloat( ua.substring( ua.lastIndexOf('safari/') + 7 ) );
	this.versionMajor = parseInt(this.versionMinor); 
	this.DOM1 = (document.getElementById);
	this.DOM2Event = (document.addEventListener && document.removeEventListener);
	this.mode = document.compatMode ? document.compatMode : 'BackCompat';
	this.Win = (ua.indexOf('win') != -1);
	this.Mac = (ua.indexOf('mac') != -1);
	this.NS6up = (this.NS && this.versionMajor >= 6);
	this.NS7up = (this.NS && this.versionMajor >= 7);
	this.IE4 = (this.IE && this.versionMajor == 4);
	this.IE5 = (this.IE && this.versionMajor == 5);
	this.IE55 = (this.IE && this.versionMinor == 5.5);
	this.IE5up = (this.IE && this.versionMajor >= 5);
	this.IE6x = (this.IE && this.versionMajor == 6);
	this.IE6up = (this.IE && this.versionMajor >= 6);
}
var is = new Browser();

var flashVersion = 0;
function getFlashVersion() {
    if(flashVersion == 0)
    {
	    var latestFlashVersion = 25;
	    var agent = navigator.userAgent.toLowerCase(); 
	    if (navigator.plugins != null && navigator.plugins.length > 0) {
		    var flashPlugin = navigator.plugins['Shockwave Flash'];
		    if (typeof flashPlugin == 'object'){ 
			    for (var i = latestFlashVersion; i >= 3; i--){
	                if (flashPlugin.description.indexOf(i + '.') != -1){
	                   flashVersion = i;
	                   break;
	                }
			    }
		    }
	    }
	    else if (agent.indexOf("msie") != -1 && parseInt(navigator.appVersion) >= 4 && agent.indexOf("win")!=-1 && agent.indexOf("16bit")==-1) {
		    var doc = ''+
			    '<scr' + 'ipt language="VBScript"\> \n'+
			    'On Error Resume Next \n'+
			    'Dim obFlash \n'+
			    'For i = ' + latestFlashVersion + ' To 3 Step -1 \n'+
			    '	Set obFlash = CreateObject("ShockwaveFlash.ShockwaveFlash." & i) \n'+
			    '	If IsObject(obFlash) Then \n'+
			    '		flashVersion = i \n'+
			    '		Exit For \n'+
			    '	End If \n'+
			    'Next \n'+
			    '</scr' + 'ipt\> \n';
			    
		    document.write(doc);
	    } else {flashVersion = flashVersion_DONTKNOW; }
	    //alert(flashVersion);
    }
    
return flashVersion;

}
var flashVersion_DONTKNOW = -1;
function FlashObject(){
	this.ID;
	this.maxVersion=this.maxVersion;
	this.SwfFile;
	this.minVersion;
	this.altSwfFile;
	this.altImage;
	this.altImageAddAtribute;
	this.altImageHTML;
	this.width;
	this.height;
	this.menu;
	this.background;
	this.wmode;
	this.flashvars;
	this.scale;
	this.salign;
	this.allow;
	//this.name;
}
FlashObject.prototype.rnd=function(){
	this.ranNum= Math.random()*255;
    return this.ranNum;
}
FlashObject.prototype.embed=function(){
	var buff;
	if(getFlashVersion()>=this.maxVersion){
		
		buff=''+
			'<OBJECT ID="'+this.ID+'" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" WIDTH='+this.width+' HEIGHT='+this.height+'><PARAM NAME=movie VALUE="'+this.SwfFile+'"><PARAM NAME=menu VALUE='+this.menu+'><param name="wmode" value="'+this.wmode+'"><PARAM NAME="quality" VALUE="high"><PARAM NAME="flashvars" VALUE="'+ this.flashvars +'"><PARAM NAME="bgcolor" VALUE="'+this.background+'"><PARAM NAME="scale" VALUE="'+this.scale+'"><PARAM NAME="salign" VALUE="'+this.salign+'"><PARAM NAME="allowScriptAccess" VALUE="'+this.allow+'">'+
				'<EMBED name="'+this.ID+'" src="'+this.SwfFile+'" menu="'+this.menu+'" wmode="'+this.wmode+'" quality="high" bgcolor="'+this.background+'"  WIDTH="'+this.width+'" HEIGHT="'+this.height+'" scale="'+this.scale+'" salign="'+this.salign+'" allowScriptAccess="'+this.allow+'" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" swLiveConnect="true"></EMBED>'+
			'</OBJECT>';
	}else if((getFlashVersion()> this.minVersion) && (getFlashVersion()< this.maxVersion) && this.altSwfFile){
		
		buff=''+
			'<OBJECT ID="'+this.ID+'" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" WIDTH='+this.width+' HEIGHT='+this.height+'><PARAM NAME=movie VALUE="'+this.altSwfFile+'"><PARAM NAME=menu VALUE='+this.menu+'<param name="wmode" value="'+this.wmode+'">><PARAM NAME="quality" VALUE="high"><PARAM NAME="bgcolor" VALUE='+this.background+'><PARAM NAME="allowScriptAccess" VALUE="'+this.allow+'">'+
				'<EMBED flashvars="'+ this.flashvars +'" name="'+this.ID+'" src="'+this.altSwfFile+'" menu="'+this.menu+'" wmode="'+this.wmode+'" quality=high bgcolor='+this.background+'  WIDTH='+this.width+' HEIGHT='+this.height+' TYPE="application/x-shockwave-flash"  allowScriptAccess="'+this.allow+'" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" swLiveConnect="true"></EMBED>'+
			'</OBJECT>';
	}else{
		this.altImageAddAtribute ? (buff='<img src="'+this.altImage+'" width="'+this.width+'" height="'+this.height+'" border="0" '+this.altImageAddAtribute+' />'+this.altImageHTML) : (buff='<img src="'+this.altImage+'" width="'+this.width+'" height="'+this.height+'" border="0" />');
	}
	document.write(buff);
}


function getCenter(pwidth,pheight){
	wwidth=screen.width;
	wheigth=screen.height;
	lpos= (wwidth - pwidth)/2;
	tpos= (wheigth - pheight)/2;
	return lpos, tpos;
}


function PopItUp(src,w,h,s) {
	if(s) w=w+17;
	getCenter(w,h);
	Popwin = window.open(src,"pop_up","toolbar=0,width=" + w + ", height=" + h + ", left="+ lpos +", top="+ tpos +"; location=0, directories=0, status=1, scrollbars="+s+", menubar=0, resizable=1, copyhistory=0");
	Popwin.focus();
}

function getUrl(obj){
	selectedObj=obj.options[obj.selectedIndex];
	document.location.href=selectedObj.value;
	return true;
}

function getWindowHeight(){
	var windowHeight = 0;
	if(typeof(window.innerHeight) == 'number'){
		windowHeight = window.innerHeight;
	}else{
		if(document.documentElement && document.documentElement.clientHeight){
			windowHeight = document.documentElement.clientHeight;
		}else{
			if(document.body && document.body.clientHeight){
				windowHeight = document.body.clientHeight;
			}
		}
	}
	return windowHeight;
}


function mailTo(m,e,t,s) {
	if (!e) {
		e='gsk.com.tr';
	}
	if (!t) {
		t=m+String.fromCharCode(64)+e;
	}
	if(!s){
	    mail=m+String.fromCharCode(64)+e;
	}
	else {
	    mail=m+String.fromCharCode(64)+e+"?subject="+s;
	}
	document.write('<a href="mailto:'+mail+'" style="background:none;">'+t+'</a>');
}

function setFooter(){
	if (document.getElementById){
		var windowHeight = getWindowHeight();
		if (windowHeight>0){
			var contentHeight = document.getElementById('header').offsetHeight + document.getElementById('mainContent').offsetHeight
			var footerElement = document.getElementById('footer');
			var footerHeight  = footerElement.offsetHeight;
			if (windowHeight - (contentHeight + footerHeight)>= 0) {
				footerElement.style.marginTop = (windowHeight - (contentHeight+footerHeight)) + 'px';
			}else{
				footerElement.style.marginTop = '0';
			}
		}
	}
}

/*window.onload = function() {
    var links = document.getElementsByTagName('a');
    for (var i=0;i < links.length;i++) {
        if (links[i].className == 'yenipencere') {
            links[i].onclick = function() {
                window.open(this.href);
                return false;
            };
        }
    }
    setFooter();
};
*/
window.onload = function() {
    setFooter();
}
window.onresize = function () {
    setFooter();
}


function MaxValue(value1, value2, value3, value4)
{
	var RetVal = value1;
	
	if(value1 < value2)
	{
		RetVal = value2;
	}
	
	if(RetVal < value3)
	{
		RetVal = value3;
	}
	
	if(RetVal < value4)
	{
		RetVal = value4;
	}
	
	return RetVal;
}

function $(_id){
	return document.getElementById(_id);
}
function $$(_class){
	return getElementsByClassName(_class);
}
function $$$(_tag){
	return getElementsByTagName(_tag);
}
function $o(id){
	return document.getElementById(id).offsetHeight;
}
function $h(id){
	return id.style.height;
}

// MAGIC TABS 

function magicTabs(_tabID){
	var tabbedItems = $('tabbedItems');
	var tabbedItemsLists = tabbedItems.getElementsByTagName('LI');
	
	for (i=0; i< tabbedItemsLists.length;){
		$('tabbedItemsListingContent_'+i).className = "tabbedItemsListingContentClose";
		tabbedItemsLists[i].className = "normal";
		i++;
	}
	tabbedItemsLists[_tabID].className = "selected"
	$('tabbedItemsListingContent_'+_tabID).className = "tabbedItemsListingContentOpen";
		
}


// EXPAND CONTENT

function expandableContent(_contentID,action,contentDivId) {
	if(contentDivId){
	var expandableContentID = $(contentDivId);
	}
	else {
	var expandableContentID = $('expandableContent');
	}
	var expandableContentTag = expandableContentID.getElementsByTagName('SPAN');
	if(action == "kapat")
		expandableContentTag[_contentID].className = "expandableContentTitleOpen";
	else {
		expandableContentTag[_contentID].className = "expandableContentTitleClose";
	}
	
	
}



// JUMP TO SECTION 


function jumpToSection(id,target){
    var jumpID = $(id);
    if(jumpID.options[document.getElementById(id).selectedIndex].value == "0"){
    
    }
    else {
        if(target == "self"){
            window.location = jumpID.options[document.getElementById(id).selectedIndex].value;
        }
        else if (target == "new") {
            window.open(jumpID.options[document.getElementById(id).selectedIndex].value,'GSKTurkeyWebSite')
        }
        else if(target = "urun"){
            window.location = "http://10.0.2.139/urun_portfoyu/urundetay.aspx?kategori="+jumpID.options[document.getElementById(id).selectedIndex].value;
        }
    }
}

function query(ji) {
    hu = window.location.search.substring(1);
    gy = hu.split("&");
    for (i=0;i<gy.length;i++) {
        ft = gy[i].split("=");
        if (ft[0] == ji) {
            return ft[1];
        }
    }
}

function websiteWarning(link){
    PopItUp('/warning.aspx?location='+link,500,450)
    return false;
}


/*

var ss = {
  fixAllLinks: function() {
    // Get a list of all links in the page
    var allLinks = document.getElementsByTagName('a');
    // Walk through the list
    for (var i=0;i<allLinks.length;i++) {
      var lnk = allLinks[i];
      if ((lnk.href && lnk.href.indexOf('#') != -1) && 
          ( (lnk.pathname == location.pathname) ||
	    ('/'+lnk.pathname == location.pathname) ) && 
          (lnk.search == location.search)) {
        // If the link is internal to the page (begins in #)
        // then attach the smoothScroll function as an onclick
        // event handler
        ss.addEvent(lnk,'click',ss.smoothScroll);
      }
    }
  },

  smoothScroll: function(e) {
    // This is an event handler; get the clicked on element,
    // in a cross-browser fashion
    if (window.event) {
      target = window.event.srcElement;
    } else if (e) {
      target = e.target;
    } else return;

    // Make sure that the target is an element, not a text node
    // within an element
    if (target.nodeName.toLowerCase() != 'a') {
      target = target.parentNode;
    }
  
    // Paranoia; check this is an A tag
    if (target.nodeName.toLowerCase() != 'a') return;
  
    // Find the <a name> tag corresponding to this href
    // First strip off the hash (first character)
    anchor = target.hash.substr(1);
    // Now loop all A tags until we find one with that name
    var allLinks = document.getElementsByTagName('a');
    var destinationLink = null;
    for (var i=0;i<allLinks.length;i++) {
      var lnk = allLinks[i];
      if (lnk.name && (lnk.name == anchor)) {
        destinationLink = lnk;
        break;
      }
    }
    if (!destinationLink) destinationLink = document.getElementById(anchor);

    // If we didn't find a destination, give up and let the browser do
    // its thing
    if (!destinationLink) return true;
  
    // Find the destination's position
    var destx = destinationLink.offsetLeft; 
    var desty = destinationLink.offsetTop;
    var thisNode = destinationLink;
    while (thisNode.offsetParent && 
          (thisNode.offsetParent != document.body)) {
      thisNode = thisNode.offsetParent;
      destx += thisNode.offsetLeft;
      desty += thisNode.offsetTop;
    }
  
    // Stop any current scrolling
    clearInterval(ss.INTERVAL);
  
    cypos = ss.getCurrentYPos();
  
    ss_stepsize = parseInt((desty-cypos)/ss.STEPS);
    ss.INTERVAL =
setInterval('ss.scrollWindow('+ss_stepsize+','+desty+',"'+anchor+'")',10);
  
    // And stop the actual click happening
    if (window.event) {
      window.event.cancelBubble = true;
      window.event.returnValue = false;
    }
    if (e && e.preventDefault && e.stopPropagation) {
      e.preventDefault();
      e.stopPropagation();
    }
  },

  scrollWindow: function(scramount,dest,anchor) {
    wascypos = ss.getCurrentYPos();
    isAbove = (wascypos < dest);
    window.scrollTo(0,wascypos + scramount);
    iscypos = ss.getCurrentYPos();
    isAboveNow = (iscypos < dest);
    if ((isAbove != isAboveNow) || (wascypos == iscypos)) {
      // if we've just scrolled past the destination, or
      // we haven't moved from the last scroll (i.e., we're at the
      // bottom of the page) then scroll exactly to the link
      window.scrollTo(0,dest);
      // cancel the repeating timer
      clearInterval(ss.INTERVAL);
      // and jump to the link directly so the URL's right
      location.hash = anchor;
    }
  },

  getCurrentYPos: function() {
    if (document.body && document.body.scrollTop)
      return document.body.scrollTop;
    if (document.documentElement && document.documentElement.scrollTop)
      return document.documentElement.scrollTop;
    if (window.pageYOffset)
      return window.pageYOffset;
    return 0;
  },

  addEvent: function(elm, evType, fn, useCapture) {
    // addEvent and removeEvent
    // cross-browser event handling for IE5+,  NS6 and Mozilla
    // By Scott Andrew
    if (elm.addEventListener){
      elm.addEventListener(evType, fn, useCapture);
      return true;
    } else if (elm.attachEvent){
      var r = elm.attachEvent("on"+evType, fn);
      return r;
    } else {
      alert("Bir hata oluştu!");
    }
  } 
}

ss.STEPS = 25;
ss.addEvent(window,"load",ss.fixAllLinks);





*/