Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 04-10-2012, 02:43 AM   PM User | #1
jaketfg
New to the CF scene

 
Join Date: Apr 2012
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
jaketfg is an unknown quantity at this point
Changing where the javascipt hover over appears

Here is the link: http://sovietgaming.com/misc.php?page=roster

We have a roster for Starcraft 2 and when you hover over one of the pictures it displays more info however if you start to scroll and hover you can no longer see it. We need to make so that you can see the hover over no matter where you are on the page. I'm pretty sure the problem is in style #10 of the js code posted below.

Code:
/*
Please refer to readme.html for full Instructions

Text[...]=[title,text]

Style[...]=[TitleColor,TextColor,TitleBgColor,TextBgColor,TitleBgImag,TextBgImag,TitleTextAlign,TextTextAlign, TitleFontFace, TextFontFace, TipPosition, StickyStyle, TitleFontSize, TextFontSize, Width, Height, BorderSize, PadTextArea, CoordinateX , CoordinateY, TransitionNumber, TransitionDuration, TransparencyLevel ,ShadowType, ShadowColor]
*/

var FiltersEnabled = 1 // if your not going to use transitions or filters in any of the tips set this to 0

Text[0]=["Forum Username: Soviet_Nova","<li>Best Race: Zerg</li><li>League: Silver</li> <li>Times Online: Afternoons/late night</li> <li>Favorite Custom map: Nexus Wars, Gem TD, Squadron TD, any other T or D really </li> <li>Location: Ft. Collins, Colorado</li>"]
Text[1]=["Forum Username: Figgy13","<li>Best Race: Zerg</li><li>League: Gold</li> <li>Times Online: Whenever possible (Wednesday's dedicated to SC2)</li> <li>Favorite custom map: SOTIOS and Risk</li> <li>Location: New Jersey</li>"]
Text[2]=["Forum Username: Soviet-Mario","<li>Offrace: meh, i like to offrace as both, but i suppose my toss is better</li><li>Location: New Orleans Louisiana</li> <li>Favorite Gear: Razer Deathadder mouse, banshee headset, marauder keyboard</li> <li>SC1 AKA: Soviet_Mario</li>"]
Text[3]=["Forum Username: Cheapliquid","<li>Best Race: Random</li><li>League: Gold</li> <li>Times Online: Randomly all day</li> <li>Favorite Custom map: GEM D</li> <li>Location: The Dirty Jersey</li>"]
Text[4]=["Forum Username: Trooper","<li>Best Race: Terran</li><li>League: Master</li> <li>Times Online: Almost every night</li> <li>Favorite Custom map: Nexus Wars</li> <li>Location: Pennsylvania</li>"]
Text[5]=["Forum Username: Soviet_Smoke","<li>Best Race: Unknown</li><li>League: Unkown</li> <li>Times Online: Unkown</li> <li>Favorite Custom map: Unkown</li> <li>Location: Unknown</li>"]
Text[6]=["Forum Username: MAXPOWER","<li>Best Race: Unknown</li><li>League: Practice</li> <li>Times Online: Never</li> <li>Favorite Custom map: Unknown</li> <li>Location: Southern Colorado</li>"]
Text[7]=["Forum Username: Oreo","<li>Best Race: Protoss</li><li>League: High Masters -peaked top 1000's NA</li> <li>Times Online: 3-5, 8-10 weekedays and weekends varies</li> <li>Favorite Custom map: Marine Arena or a MOBA</li> <li>Location: Massachusetts</li>"]
Text[8]=["Forum Username: Soviet-cbel","<li>Offrace: Both of my offraces suck, unfortunately</li><li>Stream: None</li> <li>Location: NC</li> <li>Favorite Gear: Logitech/Razer</li> <li>SC1 AKA: None</li>"]
Text[9]=["Forum Username: Frosty","<li>Best Race: Random</li><li>League: Diamond</li> <li>Times Online: Medium Activity</li> <li>Favorite Custom map: Squadron/hero attack/zealot frenzy</li> <li>Location: Edmonton, Alberta, Canada</li>"]
Text[10]=["Forum Username: Wartourist","<li>Best Race: Terran</li><li>League: Diamond</li> <li>Times Online: Mostly week nights</li> <li>Favorite Custom map: Mafia</li> <li>Location: Montreal, Canada</li>"]
Text[11]=["Forum Username: Soviet_Nova","<li>Best Race: Zerg</li><li>League: Silver</li> <li>Times Online: Afternoons/late night</li> <li>Favorite Custom map: Nexus Wars, Gem TD, Squadron TD, any other T or D really </li> <li>Location: Ft. Collins, Colorado</li>"]
Text[12]=["Forum Username: Soviet_Hegemon","<li>Best Race: Terran</li><li>League: Silver/Scrub</li> <li>Times Online: Sporadically</li> <li>Favorite Custom map: BattleCraft and Desert Strike</li> <li>Location: Everett,WA</li>"]
Text[13]=["Forum Username: Acid","<li>Off Race: Zerg</li> <li>Stream: twitch.tv/sGAcid </li> <li>Location: Upstate New York</li> <li>Favorite Gear: Logitech</li> <li>Location: Upstate New York</li> <li>SC1 AKA: Soviet_Acid</li>"]
Text[14]=["Forum Username: Hauskta","<li>Offrace: Terran</li> <li>Stream: http://www.twitch.tv/haustka</li> <li>Location: Tucson, Arizona</li> <li>Favorite Gear: Logitech</li> <li>SC1 AKA: Soviet_Haustka</li>"]
Text[15]=["Forum Username: Soviet_Greywolf","<li>Offrace: None</li><li>Stream: None</li> <li>Location: Everett, WA</li> <li>Favorite Gear: Logitech</li> <li>SC1 AKA: Soviet_Greywolf</li>"]
Text[16]=["Forum Username: Soviet_Nova","<li>Best Race: Zerg</li><li>League: Silver</li> <li>Times Online: Afternoons/late night</li> <li>Favorite Custom map: Nexus Wars, Gem TD, Squadron TD, any other T or D really </li> <li>Location: Ft. Collins, Colorado</li>"]
Text[17]=["Forum Username: MAXPOWER","<li>Best Race: Unknown</li><li>League: Practice</li> <li>Times Online: Never</li> <li>Favorite Custom map: Unknown</li> <li>Location: Southern Colorado</li>"]
Text[18]=["Forum Username: Maesy","<li>Best Race: Random</li><li>League: Diamond</li> <li>Times Online: Scattered depending on work schedule</li> <li>Favorite Custom map: Gem TD/Desert Strike equally.</li> <li>Location: Florida</li>"]
Text[19]=["Forum Username: PeaceSC2","<li>Best Race: Terran</li><li>League: Masters</li> <li>Times Online: Depends on the day</li> <li>Favorite Custom map: no idea</li> <li>Location: Vancouver BC, Canada</li>"]
Text[20]=["Forum Username: Link uK","<li>Best Race: Zerg</li><li>League: Diamond</li> <li>Times Online: Any other day but Wed.</li> <li>Favorite Custom map: Any map made by Darglein or Multitasking trainer.</li> <li>Location:Don't Be a Creep Bro</li>"]
Text[21]=["Forum Username: Kenjiman","<li>Best Race: Zerg</li><li>League: Diamond</li> <li>Times Online: Whenever i dont have homework or midterms/finals.</li> <li>Favorite Custom map: Don't really have one..</li> <li>Location: Cal Poly San Luis Obispo</li>"]
Text[22]=["Forum Username: DCE_Mason","<li>Best Race: Zerg</li><li>League: Platinum</li> <li>Times Online:After school (4pm-10pm CST)</li> <li>Favorite Custom map: 1v1 Obs Metalopolis Slime</li> <li>Location: Chicago, IL</li>"]
Text[23]=["Forum Username: MicroSyntax","<li>Offrace: No! There is no Offrace, there is only one race and it has machineguns and women with long legs. </li><li>Stream: under construction</li> <li>Location: Canoobian</li> <li>Favorite Gear: If it moves or clicks, I like it. </li> <li>SC1 AKA: None</li>"]
Text[24]=["Forum Username: TeamSnorlax","<li>Best Race: Protoss</li><li>League: Platinum</li> <li>Times Online: Afternoon / Evening Central</li> <li>Favorite Custom map: N/A</li> <li>Location: Chicago, IL, USA/li>"]
Text[25]=["Forum Username: SniperRome","<li>Best Race: Protoss (Random)</li><li>League: High Masters</li> <li>Times Online: Random</li> <li>Favorite Custom map: Starjeweled, Diplomacy</li> <li>Location: Alberta, Canada</li>"]
Text[26]=["Forum Username: Swordy","<li>Best Race: Zerg</li><li>League: Diamond</li> <li>Times Online: Frequently</li> <li>Favorite Custom map: MageCraft + RMC</li> <li>Location: Devon, United Kingdom</li>"]
Text[27]=["Forum Username: fox","<li>Best Race: Terran</li><li>League: High Masters</li> <li>Times Online: All the time</li> <li>Favorite Custom map: None</li> <li>Location: USA</li>"]
Text[28]=["Forum Username: CivilAnarchy","<li>Best Race: Zerg</li><li>League: Master</li> <li>Times Online: Highly active but varied times</li> <li>Favorite Custom map: Phantom Mode</li> <li>Location: Voorhees New Jersey</li>"]
Text[29]=["Forum Username: nobodyWondeR","<li>Best Race: Terran</li><li>League: Master</li> <li>Times Online: weekdays 3-5:30pm PST</li> <li>Favorite Custom map: metalopolis, shattered, antiga</li> <li>Location: California</li>"]
Text[30]=["Forum Username: steveyy153","<li>Best Race: Protoss</li><li>League: Master</li> <li>Times Online: Weekends and whenever else I have time</li> <li>Favorite Custom map: Civ Sapphire</li> <li>Location: Bloomington, Indiana</li>"]
Text[31]=["Forum Username: Nemesis","<li>Best Race: Protoss</li><li>League: Master</li> <li>Times Online: Whenever I can, usually mid evning to early morning</li> <li>Favorite Custom map: None</li> <li>Location: Nova Scotia, Canada</li>"]
Text[32]=["Forum Username: Lane_","<li>Best Race: Zerg</li><li>League: Diamond</li> <li>Times Online: Always</li> <li>Favorite Custom map: Star Battle, Risk</li> <li>Location: USAr</li>"]
Text[33]=["Forum Username: Defrath","<li>Best Race: Protosss</li><li>League: Diamond</li> <li>Times Online: After 5</li> <li>Favorite Custom map: BW Fall of the Dark Lord, or BW Bunker Wars.e</li> <li>Location: Schenectady, New York.</li>"]
Text[34]=["Forum Username: ExO","<li>Best Race: Protoss</li><li>League: Master</li> <li>Times Online: N/A</li> <li>Favorite Custom map: N/A </li> <li>Location: Houston, Texas </li>"]
Text[35]=["Forum Username: Haro","<li>Stream: None</li><li>Offrace: Zerg None</li> <li>Location: New York City</li> <li>Favorite Gear: None</li> <li>Sc1 AKA: None</li>"]
Text[36]=["Forum Username: ZimZam","<li>Stream: None</li><li>Offrace: Zerg</li> <li>Location: Portland, Oregon</li> <li>Favorite Gear: Rapoo </li> <li>Sc1 AKA: Zimri</li>"]
Text[37]=["Forum Username: Voodoo","<li>Stream: None</li><li>Offrace: Was top Dia z, currently playing as low Dia p </li> <li>Location: Tornot, Ontario, Canada </li> <li>Favorite Gear: I use a laptop and a logitech g9x dontlaughatme</li> <li>Sc1 AKA: None</li>"]
Text[38]=["Forum Username: daSnake","<li>Stream: None</li><li>Offrace: Toss is all I know</li> <li>Location: what is this? AOL? FL</li> <li>Favorite Gear: Razer all the way</li> <li>Sc1 AKA: Soviet_da5nake good times... I have another one but can't remember</li>"]
Text[39]=["Forum Username: SuzumiyauK","<li>Stream: None</li><li>Offrace: None</li> <li>Location: Toronto, Ontario</li> <li>Favorite Gear: Headphone: Bose Mouse: Steelseries Keyboard: Logitech </li> <li>Sc1 AKA: SuzumiyauK, GeneraluK, Mystic_Raptor, FoW_Raptor, NoVa</li>"]
Text[40]=["Forum Username: SlamDuncan","<li>Stream: SlamDuncan64 on twitchtv</li><li>Offrace: I play random lol</li> <li>Location: Canada</li> <li>Favorite Gear: Steeleseries and Razer mix</li> <li>Sc1 AKA: None</li>"]
Text[41]=["Forum Username: Drpoppler","<li>Stream: justin.tv/drpoppler</li><li>Offrace: Protoss</li> <li>Location: Canada eh?</li> <li>Favorite Gear: Logitech</li> <li>Sc1 AKA: None</li>"]
Text[42]=["Forum Username: Crevasse","<li>Stream: None</li><li>Offrace: Protoss</li> <li>Location: CA</li> <li>Favorite Gear: Filco, Steelseries</li> <li>Sc1 AKA: None</li>"]
Text[43]=["Forum Username: Dystopian","<li>Stream: http://www.teamliquid.net/video/streams/Dystopian</li><li>Offrace: Terran</li> <li>Location: Arizona</li> <li>Favorite Gear: Logitech</li> <li>Sc1 AKA: None</li>"]
Text[44]=["Forum Username: sGstorm","<li>Stream: twitch.tv/jgreen46</li><li>Offrace: Protoss like a boss</li> <li>Location: Vancouver, Canada</li> <li>Favorite Gear: Sentinel Zero-G Mouse. Changeable mouse weight? YES PLZ.</li> <li>Sc1 AKA: hizzlemafizzle, fox not sGFox</li>"]
Text[45]=["Forum Username: eFeKZ","<li>Stream: http://www.twitch.tv/eFeKZ</li><li>Offrace: Zerg Top8Masters</li> <li>Location: Currently Costa Rica (Soon Canada again)</li> <li>Favorite Gear: Razer / Steel Series</li> <li>Sc1 AKA: fLow</li>"]
Text[46]=["Forum Username: AceGeneral","<li>Stream: None</li><li>Offrace: Oh God No!</li> <li>Location: Corn State of Indiana</li> <li>Favorite Gear: LOL what gear</li> <li>Sc1 AKA: Ace</li>"]
Text[47]=["Forum Username: Defrath","<li>Best Race: Protosss</li><li>League: Diamond</li> <li>Times Online: After 5</li> <li>Favorite Custom map: BW Fall of the Dark Lord, or BW Bunker Wars.e</li> <li>Location: Schenectady, New York.</li>"]
Text[48]=["Forum Username: Kaiser","<li>Stream: None</li><li>Offrace: I only play Zerg because I have self-respect</li> <li>Location: British Columbia, Canada</li> <li>Favorite Gear: My trusty MX518.</li> <li>Sc1 AKA: None</li>"]
Text[49]=["Forum Username: Comedian","<li>Stream: None</li><li>Offrace: all</li> <li>Location: Purdue University</li> <li>Favorite Gear: None</li> <li>Sc1 AKA: None</li>"]
Text[50]=["Forum Username: Swordy","<li>Stream: None</li><li>Offrace: None</li> <li>Location: Devon, United Kingdom England</li> <li>Favorite Gear: Logitech</li> <li>Sc1 AKA: MyWifeForAiur, Soviet_Sword</li>"]
Text[51]=["Forum Username: Blank","<li>Stream:</li><li>Offrace:</li> <li>Location: </li> <li>Favorite Gear: </li> <li>Sc1 AKA:</li>"]
Text[52]=["Forum Username: MAXPOWER","<li>Best Race: Unknown</li><li>League: Practice</li> <li>Times Online: Never</li> <li>Favorite Custom map: Unknown</li> <li>Location: Southern Colorado</li>"]
Text[53]=["Forum Username: Acid","<li>Off Race: Zerg</li> <li>Stream: twitch.tv/sGAcid </li> <li>Location: Upstate New York</li> <li>Favorite Gear: Logitech</li> <li>Location: Upstate New York</li> <li>SC1 AKA: Soviet_Acid</li>"]
Text[54]=["Forum Username: Soviet-Mario","<li>Offrace: meh, i like to offrace as both, but i suppose my toss is better</li><li>Location: New Orleans Louisiana</li> <li>Favorite Gear: Razer Deathadder mouse, banshee headset, marauder keyboard</li> <li>SC1 AKA: Soviet_Mario</li>"]

Style[0]=["white","black","#000099","#E8E8FF","","","","","","","","","","",200,"",2,2,10,10,51,1,0,"",""]
Style[1]=["white","black","#000099","#E8E8FF","","","","","","","center","","","",200,"",2,2,10,10,"","","","",""]
Style[2]=["white","black","#000099","#E8E8FF","","","","","","","left","","","",200,"",2,2,10,10,"","","","",""]
Style[3]=["white","black","#000099","#E8E8FF","","","","","","","float","","","",200,"",2,2,10,10,"","","","",""]
Style[4]=["white","black","#000099","#E8E8FF","","","","","","","fixed","","","",200,"",2,2,1,1,"","","","",""]
Style[5]=["white","black","#000099","#E8E8FF","","","","","","","","sticky","","",200,"",2,2,10,10,"","","","",""]
Style[6]=["white","black","#000099","#E8E8FF","","","","","","","","keep","","",200,"",2,2,10,10,"","","","",""]
Style[7]=["white","black","#000099","#E8E8FF","","","","","","","","","","",200,"",2,2,40,10,"","","","",""]
Style[8]=["white","black","#000099","#E8E8FF","","","","","","","","","","",200,"",2,2,10,50,"","","","",""]
Style[9]=["white","black","#000099","#E8E8FF","","","","","","","","","","",200,"",2,2,10,10,51,0.5,75,"simple","gray"]
Style[10]=["white","white","#2C2C2C","#2C2C2C","http://soviet.scdiplo.com/images/gamer/nav_sub.png","","center","left","Verdana","Verdana","center","",2,2,300,100,2,20,10,0,50,1,80,"complex","gray"]
Style[11]=["white","white","#000099","#E8E8FF","","","","","","","","","","",200,"",2,2,10,10,51,0.5,45,"simple","gray"]
Style[12]=["white","black","#000099","#E8E8FF","","","","","","","","","","",200,"",2,2,10,10,"","","","",""]

applyCssFilter()
What should be done to fix it?

Thank you!
jaketfg is offline   Reply With Quote
Old 04-10-2012, 03:32 AM   PM User | #2
Old Pedant
Supreme Master coder!

 
Old Pedant's Avatar
 
Join Date: Feb 2009
Posts: 23,200
Thanks: 59
Thanked 3,996 Times in 3,965 Posts
Old Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to all
You have to detect where on the window you are and then add on the size of the hover-over. If any part of the hover-over would be off the window, you adjust the position.

You are right that it is related to that style, which is fixed in relation to the mouse position. But the style, per se, is fine. You just have to mod the JS code so that it detects the situation and, effectively, adjusts the style dynamically.
__________________
An optimist sees the glass as half full.
A pessimist sees the glass as half empty.
A realist drinks it no matter how much there is.
Old Pedant is offline   Reply With Quote
Old 04-10-2012, 04:01 AM   PM User | #3
jaketfg
New to the CF scene

 
Join Date: Apr 2012
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
jaketfg is an unknown quantity at this point
Ok here is the main.js file that goes with it... ill look through to see if i can figure it out but i doubt it
Code:
<!-- 
/*
 Pleas leave this notice.
 DHTML tip message version 1.2 copyright Essam Gamal 2003 (http://migoicons.tripod.com, migoicons@hotmail.com)
 All modifications are done in the style.js you should not modify this file.  Created on : 06/03/2003
 Script featured on and can be found at Dynamic Drive (http://www.dynamicdrive.com)
*/ 

var ua = navigator.userAgent
var ps = navigator.productSub 
var dom = (document.getElementById)? 1:0
var ie4 = (document.all&&!dom)? 1:0
var ie5 = (document.all&&dom)? 1:0
var nn4 =(navigator.appName.toLowerCase() == "netscape" && parseInt(navigator.appVersion) == 4)
var nn6 = (dom&&!ie5)? 1:0
var sNav = (nn4||nn6||ie4||ie5)? 1:0
var cssFilters = ((ua.indexOf("MSIE 5.5")>=0||ua.indexOf("MSIE 6")>=0)&&ua.indexOf("Opera")<0)? 1:0
var Style=[],Text=[],Count=0,sbw=0,move=0,hs="",mx,my,scl,sct,ww,wh,obj,sl,st,ih,iw,vl,hl,sv,evlh,evlw,tbody
var HideTip = "eval(obj+sv+hl+';'+obj+sl+'=0;'+obj+st+'=-800')"
var doc_root = ((ie5&&ua.indexOf("Opera")<0||ie4)&&document.compatMode=="CSS1Compat")? "document.documentElement":"document.body"
var PX = (nn6)? "px" :"" 

if(sNav) {
	window.onresize = ReloadTip
	document.onmousemove = MoveTip
	if(nn4) document.captureEvents(Event.MOUSEMOVE) 
}	
if(nn4||nn6) {
	mx = "e.pageX"
	my = "e.pageY"
	scl = "window.pageXOffset"
	sct = "window.pageYOffset"	
	if(nn4) {
		obj = "document.TipLayer."
		sl = "left"
		st = "top"
		ih = "clip.height"
		iw = "clip.width"
		vl = "'show'"
		hl = "'hide'"
		sv = "visibility="
	}
	else obj = "document.getElementById('TipLayer')."
} 
if(ie4||ie5) {
	obj = "TipLayer."
	mx = "event.x"
	my = "event.y"
	scl = "eval(doc_root).scrollLeft"
	sct = "eval(doc_root).scrollTop"
	if(ie5) {
		mx = mx+"+"+scl 
		my = my+"+"+sct
	}
}
if(ie4||dom){
	sl = "style.left"
	st = "style.top"
	ih = "offsetHeight"
	iw = "offsetWidth"
	vl = "'visible'"
	hl = "'hidden'"
	sv = "style.visibility="
}
if(ie4||ie5||ps>=20020823) {
	ww = "eval(doc_root).clientWidth"
	wh = "eval(doc_root).clientHeight"
}	 
else { 
	ww = "window.innerWidth"
	wh = "window.innerHeight"
	evlh = eval(wh)
	evlw = eval(ww)
	sbw=15
}	

function applyCssFilter(){
	if(cssFilters&&FiltersEnabled) { 
		var dx = " progid:DXImageTransform.Microsoft."
		TipLayer.style.filter = "revealTrans()"+dx+"Fade(Overlap=1.00 enabled=0)"+dx+"Inset(enabled=0)"+dx+"Iris(irisstyle=PLUS,motion=in enabled=0)"+dx+"Iris(irisstyle=PLUS,motion=out enabled=0)"+dx+"Iris(irisstyle=DIAMOND,motion=in enabled=0)"+dx+"Iris(irisstyle=DIAMOND,motion=out enabled=0)"+dx+"Iris(irisstyle=CROSS,motion=in enabled=0)"+dx+"Iris(irisstyle=CROSS,motion=out enabled=0)"+dx+"Iris(irisstyle=STAR,motion=in enabled=0)"+dx+"Iris(irisstyle=STAR,motion=out enabled=0)"+dx+"RadialWipe(wipestyle=CLOCK enabled=0)"+dx+"RadialWipe(wipestyle=WEDGE enabled=0)"+dx+"RadialWipe(wipestyle=RADIAL enabled=0)"+dx+"Pixelate(MaxSquare=35,enabled=0)"+dx+"Slide(slidestyle=HIDE,Bands=25 enabled=0)"+dx+"Slide(slidestyle=PUSH,Bands=25 enabled=0)"+dx+"Slide(slidestyle=SWAP,Bands=25 enabled=0)"+dx+"Spiral(GridSizeX=16,GridSizeY=16 enabled=0)"+dx+"Stretch(stretchstyle=HIDE enabled=0)"+dx+"Stretch(stretchstyle=PUSH enabled=0)"+dx+"Stretch(stretchstyle=SPIN enabled=0)"+dx+"Wheel(spokes=16 enabled=0)"+dx+"GradientWipe(GradientSize=1.00,wipestyle=0,motion=forward enabled=0)"+dx+"GradientWipe(GradientSize=1.00,wipestyle=0,motion=reverse enabled=0)"+dx+"GradientWipe(GradientSize=1.00,wipestyle=1,motion=forward enabled=0)"+dx+"GradientWipe(GradientSize=1.00,wipestyle=1,motion=reverse enabled=0)"+dx+"Zigzag(GridSizeX=8,GridSizeY=8 enabled=0)"+dx+"Alpha(enabled=0)"+dx+"Dropshadow(OffX=3,OffY=3,Positive=true,enabled=0)"+dx+"Shadow(strength=3,direction=135,enabled=0)"
	}
}

function stm(t,s) {
  if(sNav) {
  	if(t.length<2||s.length<25) {
		var ErrorNotice = "DHTML TIP MESSAGE VERSION 1.2 ERROR NOTICE.\n"
		if(t.length<2&&s.length<25) alert(ErrorNotice+"It looks like you removed an entry or more from the Style Array and Text Array of this tip.\nTheir should be 25 entries in every Style Array even though empty and 2 in every Text Array. You defined only "+s.length+" entries in the Style Array and "+t.length+" entry in the Text Array. This tip won't be viewed to avoid errors")
		else if(t.length<2) alert(ErrorNotice+"It looks like you removed an entry or more from the Text Array of this tip.\nTheir should be 2 entries in every Text Array. You defined only "+t.length+" entry. This tip won't be viewed to avoid errors.")
		else if(s.length<25) alert(ErrorNotice+"It looks like you removed an entry or more from the Style Array of this tip.\nTheir should be 25 entries in every Style Array even though empty. You defined only "+s.length+" entries. This tip won't be viewed to avoid errors.")
 	}
  	else {
		var ab = "" ;var ap = ""
		var titCol = (s[0])? "COLOR='"+s[0]+"'" : ""
		var txtCol = (s[1])? "COLOR='"+s[1]+"'" : ""
		var titBgCol = (s[2])? "BGCOLOR='"+s[2]+"'" : ""
		var txtBgCol = (s[3])? "BGCOLOR='"+s[3]+"'" : ""
		var titBgImg = (s[4])? "BACKGROUND='"+s[4]+"'" : ""	
		var txtBgImg = (s[5])? "BACKGROUND='"+s[5]+"'" : ""
		var titTxtAli = (s[6] && s[6].toLowerCase()!="left")? "ALIGN='"+s[6]+"'" : ""
		var txtTxtAli = (s[7] && s[7].toLowerCase()!="left")? "ALIGN='"+s[7]+"'" : ""   
		var add_height = (s[15])? "HEIGHT='"+s[15]+"'" : ""
		if(!s[8])  s[8] = "Verdana,Arial,Helvetica"
		if(!s[9])  s[9] = "Verdana,Arial,Helvetica"					
		if(!s[12]) s[12] = 1
		if(!s[13]) s[13] = 1
		if(!s[14]) s[14] = 200
		if(!s[16]) s[16] = 0
		if(!s[17]) s[17] = 0
		if(!s[18]) s[18] = 10
		if(!s[19]) s[19] = 10
		hs = s[11].toLowerCase() 
		if(ps==20001108){
		if(s[2]) ab="STYLE='border:"+s[16]+"px solid"+" "+s[2]+"'"
		ap="STYLE='padding:"+s[17]+"px "+s[17]+"px "+s[17]+"px "+s[17]+"px'"}
		var closeLink=(hs=="sticky")? "<TD ALIGN='right'><FONT SIZE='"+s[12]+"' FACE='"+s[8]+"'><A HREF='javascript:void(0)' ONCLICK='stickyhide()' STYLE='text-decoration:none;color:"+s[0]+"'><B>Close</B></A></FONT></TD>":""
		var title=(t[0]||hs=="sticky")? "<TABLE WIDTH='100%' BORDER='0' CELLPADDING='0' CELLSPACING='0'><TR><TD "+titTxtAli+"><FONT SIZE='"+s[12]+"' FACE='"+s[8]+"' "+titCol+"><B>"+t[0]+"</B></FONT></TD>"+closeLink+"</TR></TABLE>" : ""
		var txt="<TABLE "+titBgImg+" "+ab+" WIDTH='"+s[14]+"' BORDER='0' CELLPADDING='"+s[16]+"' CELLSPACING='0' "+titBgCol+" ><TR><TD>"+title+"<TABLE WIDTH='100%' "+add_height+" BORDER='0' CELLPADDING='"+s[17]+"' CELLSPACING='0' "+txtBgCol+" "+txtBgImg+"><TR><TD "+txtTxtAli+" "+ap+" VALIGN='top'><FONT SIZE='"+s[13]+"' FACE='"+s[9]+"' "+txtCol +">"+t[1]+"</FONT></TD></TR></TABLE></TD></TR></TABLE>"
		if(nn4) {
			with(eval(obj+"document")) {
				open()
				write(txt)
				close()
			}
		}
		else eval(obj+"innerHTML=txt")
		tbody = {
			Pos:s[10].toLowerCase(), 
			Xpos:s[18],
			Ypos:s[19], 
			Transition:s[20],
			Duration:s[21], 
			Alpha:s[22],
			ShadowType:s[23].toLowerCase(),
			ShadowColor:s[24],
			Width:parseInt(eval(obj+iw)+3+sbw)
		}
		if(ie4) { 
			TipLayer.style.width = s[14]
	 		tbody.Width = s[14]
		}
		Count=0	
		move=1
 	 }
  }
}

function MoveTip(e) {
	if(move) {
		var X,Y,MouseX = eval(mx),MouseY = eval(my); tbody.Height = parseInt(eval(obj+ih)+3)
		tbody.wiw = parseInt(eval(ww+"+"+scl)); tbody.wih = parseInt(eval(wh+"+"+sct))
		switch(tbody.Pos) {
			case "left" : X=MouseX-tbody.Width-tbody.Xpos; Y=MouseY+tbody.Ypos; break
			case "center": X=MouseX-(tbody.Width/2); Y=MouseY+tbody.Ypos; break
			case "float": X=tbody.Xpos+eval(scl); Y=tbody.Ypos+eval(sct); break	
			case "fixed": X=tbody.Xpos; Y=tbody.Ypos; break		
			default: X=MouseX+tbody.Xpos; Y=MouseY+tbody.Ypos
		}

		if(tbody.wiw<tbody.Width+X) X = tbody.wiw-tbody.Width
		if(tbody.wih<tbody.Height+Y+sbw) {
			if(tbody.Pos=="float"||tbody.Pos=="fixed") Y = tbody.wih-tbody.Height-sbw
			else Y = MouseY-tbody.Height
		}
		if(X<0) X=0 
		eval(obj+sl+"=X+PX;"+obj+st+"=Y+PX")
		ViewTip()
	}
}

function ViewTip() {
  	Count++
	if(Count == 1) {
		if(cssFilters&&FiltersEnabled) {	
			for(Index=28; Index<31; Index++) { TipLayer.filters[Index].enabled = 0 }
			for(s=0; s<28; s++) { if(TipLayer.filters[s].status == 2) TipLayer.filters[s].stop() }
			if(tbody.Transition == 51) tbody.Transition = parseInt(Math.random()*50)
			var applyTrans = (tbody.Transition>-1&&tbody.Transition<24&&tbody.Duration>0)? 1:0
			var advFilters = (tbody.Transition>23&&tbody.Transition<51&&tbody.Duration>0)? 1:0
			var which = (applyTrans)?0:(advFilters)? tbody.Transition-23:0 
			if(tbody.Alpha>0&&tbody.Alpha<100) {
	  			TipLayer.filters[28].enabled = 1
	  			TipLayer.filters[28].opacity = tbody.Alpha
			}
			if(tbody.ShadowColor&&tbody.ShadowType == "simple") {
	  			TipLayer.filters[29].enabled = 1
	  			TipLayer.filters[29].color = tbody.ShadowColor
			}
			else if(tbody.ShadowColor&&tbody.ShadowType == "complex") {
	  			TipLayer.filters[30].enabled = 1
	  			TipLayer.filters[30].color = tbody.ShadowColor
			}
			if(applyTrans||advFilters) {
				eval(obj+sv+hl)
	  			if(applyTrans) TipLayer.filters[0].transition = tbody.Transition
	  			TipLayer.filters[which].duration = tbody.Duration 
	  			TipLayer.filters[which].apply()
			}
		}
 		eval(obj+sv+vl)
		if(cssFilters&&FiltersEnabled&&(applyTrans||advFilters)) TipLayer.filters[which].play()
		if(hs == "sticky") move=0
  	}
}

function stickyhide() {
	eval(HideTip)
}

function ReloadTip() {
	 if(nn4&&(evlw!=eval(ww)||evlh!=eval(wh))) location.reload()
	 else if(hs == "sticky") eval(HideTip)
}

function htm() {
	if(sNav) {
		if(hs!="keep") {
			move=0; 
			if(hs!="sticky") eval(HideTip)
		}	
	} 
}


//-->
jaketfg is offline   Reply With Quote
Old 04-10-2012, 05:32 AM   PM User | #4
Old Pedant
Supreme Master coder!

 
Old Pedant's Avatar
 
Join Date: Feb 2009
Posts: 23,200
Thanks: 59
Thanked 3,996 Times in 3,965 Posts
Old Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to all
OH MY! Are you aware that code is at least 10 years old?

It is looking for browsers--Netscape Navigator 4 and 6 and MSIE 5--that NO LONGER EXIST!

I would not even *TRY* to modify that code. I would just throw it out and start over.
__________________
An optimist sees the glass as half full.
A pessimist sees the glass as half empty.
A realist drinks it no matter how much there is.
Old Pedant is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 04:14 PM.


Advertisement
Log in to turn off these ads.