Wednesday, April 11, 2007

JavaScript Dropdown Menu

// Copyright (C) 2005 Ilya S. Lyubinskiy. All rights reserved.
// Technical support: http://www.php-development.ru/
//
// YOU MAY NOT
// (1) Remove or modify this copyright notice.
// (2) Distribute this code, any part or any modified version of it.
// Instead, you can link to the homepage of this code:
// http://www.php-development.ru/javascripts/dropdown.php.
//
// YOU MAY
// (1) Use this code on your website.
// (2) Use this code as a part of another product provided that
// its main use is not creating javascript menus.
//
// NO WARRANTY
// This code is provided "as is" without warranty of any kind, either
// expressed or implied, including, but not limited to, the implied warranties
// of merchantability and fitness for a particular purpose. You expressly
// acknowledge and agree that use of this code is at your own risk.


// ----- Popup Control ---------------------------------------------------------

function at_display(x)
{
var win = window.open();
for (var i in x) win.document.write(i+' = '+x[i]+'
');
}

// ----- Show Aux -----

function at_show_aux(parent, child)
{
var p = document.getElementById(parent);
var c = document.getElementById(child );

var top = (c["at_position"] == "y") ? p.offsetHeight+2 : 0;
var left = (c["at_position"] == "x") ? p.offsetWidth +2 : 0;

for (; p; p = p.offsetParent)
{
top += p.offsetTop;
left += p.offsetLeft;
}

c.style.position = "absolute";
c.style.top = top +'px';
c.style.left = left+'px';
c.style.visibility = "visible";
}

// ----- Show -----

function at_show()
{
var p = document.getElementById(this["at_parent"]);
var c = document.getElementById(this["at_child" ]);

at_show_aux(p.id, c.id);

clearTimeout(c["at_timeout"]);
}

// ----- Hide -----

function at_hide()
{
var c = document.getElementById(this["at_child"]);

c["at_timeout"] = setTimeout("document.getElementById('"+c.id+"').style.visibility = 'hidden'", 333);
}

// ----- Click -----

function at_click()
{
var p = document.getElementById(this["at_parent"]);
var c = document.getElementById(this["at_child" ]);

if (c.style.visibility != "visible")
at_show_aux(p.id, c.id);
else c.style.visibility = "hidden";

return false;
}

// ----- Attach -----

// PARAMETERS:
// parent - id of visible html element
// child - id of invisible html element that will be dropdowned
// showtype - "click" = you should click the parent to show/hide the child
// "hover" = you should place the mouse over the parent to show
// the child
// position - "x" = the child is displayed to the right of the parent
// "y" = the child is displayed below the parent
// cursor - Omit to use default cursor or check any CSS manual for possible
// values of this field

function at_attach(parent, child, showtype, position, cursor)
{
var p = document.getElementById(parent);
var c = document.getElementById(child);

p["at_parent"] = p.id;
c["at_parent"] = p.id;
p["at_child"] = c.id;
c["at_child"] = c.id;
p["at_position"] = position;
c["at_position"] = position;

c.style.position = "absolute";
c.style.visibility = "hidden";

if (cursor != undefined) p.style.cursor = cursor;

switch (showtype)
{
case "click":
p.onclick = at_click;
p.onmouseout = at_hide;
c.onmouseover = at_show;
c.onmouseout = at_hide;
break;
case "hover":
p.onmouseover = at_show;
p.onmouseout = at_hide;
c.onmouseover = at_show;
c.onmouseout = at_hide;
break;
}
}

10 Steps to Solving Any Problem

Ten Steps To Solving Any Problem - by Brian Tracy and Colin Rose

The more organized and systematically you deal with any problem, the more positive and creative you will be in solving it. Here is a 10-step method you can use to think systematically. With this method, you develop your creativity to genius levels.

1. Change your language from negative to positive. Instead of using the word "problem," use the word "situation," or call it a challenge or an opportunity. If a sale falls through, you can say something like this is an interesting challenge. It's an opportunity for me to improve my sales effectiveness so this doesn't happen again in the future?

2. Define your situation or difficulty clearly. What exactly is the challenge you are facing? What is causing you the stress and anxiety? What is causing you to worry? Why are you unhappy? Write it out clearly in detail.

3. Ask, what else is the problem??Don't be satisfied with a superficial answer. Look for the root cause of the problem, rather than getting sidetracked by the symptom. Approach the problem from several different directions.

4. Ask yourself, what are my minimum boundary conditions??What must the solution accomplish? What ingredients must the solution contain? What would your ideal solution to this problem look like? Define your parameters clearly.

5. Pick the best solution by comparing your various possible solutions against your problem, on one hand, and your ideal solution, on the other. What is the best thing to do at this time under the circumstances?

6. Before you implement your decision, ask, what's the worst possible thing that can happen if this decision doesn't work??Before you make any expenditure of money or effort in trying to achieve your goal, you should evaluate what would happen if your decision were a complete failure.

7. Set measures on your decision. How will you know you are making progress? How will you measure success? How will you compare the success of this solution against the success of another solution? How will you define a success? Make it measurable, and then monitor it on a regular basis.

8. Accept complete responsibility for implementing the decision. Many of the most creative ideas never materialize because no one is specifically assigned the responsibility for carrying out the decision.

9. Set a deadline. A decision without a deadline is just a meaningless discussion. If it's a major decision and will take some time to implement, set a series of short-term deadlines and a schedule for reporting.

10. Take action. Get busy. Get going. Develop a sense of urgency. The faster you move in the direction of your clearly defined goals, the more creative you will be, the more energy you will have, the more you will learn and the faster you will develop your capacity to achieve even more in the future.

The world is full of creative individuals who have wonderful ideas, but almost all of them fall down when it comes to implementation. And this is where you can excel. The future belongs to the creative minority who can not only think but also take action and put their ideas into effect.

Now, here are three things you can do immediately to put these ideas into action. First, take your biggest problem or worry situation today, and ask yourself, what exactly is the problem? What am I worrying about?? Second, analyze your situation creatively and ask yourself, what else is the problem??Sometimes the real problem is not what you thought. Third, make a decision ?any decision. Assign responsibility or accept responsibility, and then take action on your ideas. The busier you work to solve your problems, the smarter you will become.

Tuesday, April 10, 2007

Wake-On-LAN with PowerShell

$POWEROFFEXE = "E:\poweroff.exe"

Import-Csv PCs.csv Foreach-Object { $params = (" wol -ip " + $_.Ip + " -subnet 255.255.0.0 -mac " + $_.Mac);
[diagnostics.process]::start($POWEROFFEXE, $params)
}
Reference:
Wake-On-LAN Script
Download PowerOff

Monday, April 9, 2007

HTML Color Code Chart

#990033
R:153
G:000
B:051
#FF3366
R:255
G:051
B:102
#CC0033
R:204
G:000
B:051
#FF0033
R:255
G:000
B:051
#FF9999
R:255
G:153
B:153
#CC3366
R:204
G:051
B:102
#FFCCFF
R:255
G:204
B:255
#CC6699
R:204
G:102
B:153
#993366
R:153
G:051
B:102
#660033
R:102
G:000
B:051
#CC3399
R:204
G:051
B:153
#FF99CC
R:255
G:153
B:204
#FF66CC
R:255
G:102
B:204
#FF99FF
R:255
G:153
B:255
#FF6699
R:255
G:102
B:153
#CC0066
R:204
G:000
B:102
#FF0066
R:255
G:000
B:102
#FF3399
R:255
G:051
B:153
#FF0099
R:255
G:000
B:153
#FF33CC
R:255
G:051
B:204
#FF00CC
R:255
G:000
B:204
#FF66FF
R:255
G:102
B:255
#FF33FF
R:255
G:051
B:255
#FF00FF
R:255
G:000
B:255
#CC0099
R:204
G:000
B:153
#990066
R:153
G:000
B:102
#CC66CC
R:204
G:102
B:204
#CC33CC
R:204
G:051
B:204
#CC99FF
R:204
G:153
B:255
#CC66FF
R:204
G:102
B:255
#CC33FF
R:204
G:051
B:255
#993399
R:153
G:051
B:153
#CC00CC
R:204
G:000
B:204
#CC00FF
R:204
G:000
B:255
#9900CC
R:153
G:000
B:204
#990099
R:153
G:000
B:153
#CC99CC
R:204
G:153
B:204
#996699
R:153
G:102
B:153
#663366
R:102
G:051
B:102
#660099
R:102
G:000
B:153
#9933CC
R:153
G:051
B:204
#660066
R:102
G:000
B:102
#9900FF
R:153
G:000
B:255
#9933FF
R:153
G:051
B:255
#9966CC
R:153
G:102
B:204
#330033
R:051
G:000
B:051
#663399
R:102
G:051
B:153
#6633CC
R:102
G:051
B:204
#6600CC
R:102
G:000
B:204
#9966FF
R:153
G:102
B:255
#330066
R:051
G:000
B:102
#6600FF
R:102
G:000
B:255
#6633FF
R:102
G:051
B:255
#CCCCFF
R:204
G:204
B:255
#9999FF
R:153
G:153
B:255
#9999CC
R:153
G:153
B:204
#6666CC
R:102
G:102
B:204
#6666FF
R:102
G:102
B:255
#666699
R:102
G:102
B:153
#333366
R:051
G:051
B:102
#333399
R:051
G:051
B:153
#330099
R:051
G:000
B:153
#3300CC
R:051
G:000
B:204
#3300FF
R:051
G:000
B:255
#3333FF
R:051
G051:
B:255
#3333CC
R:051
G:051
B:204
#0066FF
R:000
G:102
B:255
#0033FF
R:000
G:051
B:255
#3366FF
R:051
G:102
B:255
#3366CC
R:051
G:102
B:204
#000066
R:000
G:000
B:102
#000033
R:000
G:000
B:051
#0000FF
R:000
G:000
B:255
#000099
R:000
G:000
B:153
#0033CC
R:000
G:051
B:204
#0000CC
R:000
G:000
B:204
#336699
R:051
G:102
B:153
#0066CC
R:000
G:102
B:204
#99CCFF
R:153
G:204
B:255
#6699FF
R:102
G:153
B:255
#003366
R:000
G:051
B:102
#6699CC
R:102
G:153
B:204
#006699
R:000
G:102
B:153
#3399CC
R:051
G:153
B:204
#0099CC
R:000
G:153
B:204
#66CCFF
R:102
G:204
B:255
#3399FF
R:051
G:153
B:255
#003399
R:000
G:051
B:153
#0099FF
R:000
G:153
B:255
#33CCFF
R:051
G:204
B:255
#00CCFF
R:000
G:204
B:255
#99FFFF
R:153
G:255
B:255
#66FFFF
R:102
G:255
B:255
#33FFFF
R:051
G:255
B:255
#00FFFF
R:000
G:255
B:255
#00CCCC
R:000
G:204
B:204
#009999
R:000
G:153
B:153
#669999
R:102
G:153
B:153
#99CCCC
R:153
G:204
B:204
#CCFFFF
R:204
G:255
B:255
#33CCCC
R:051
G:204
B:204
#66CCCC
R:102
G:204
B:204
#339999
R:051
G:153
B:153
#336666
R:051
G:102
B:102
#006666
R:000
G:102
B:102
#003333
R:000
G:051
B:051
#00FFCC
R:000
G:255
B:204
#33FFCC
R:051
G:255
B:204
#33CC99
R:051
G:204
B:153
#00CC99
R:000
G:204
B:153
#66FFCC
R:102
G:255
B:204
#99FFCC
R:153
G:255
B:204
#00FF99
R:000
G:255
B:153
#339966
R:051
G:153
B:102
#006633
R:000
G:102
B:051
#336633
R:051
G:102
B:051
#669966
R:102
G:153
B:102
#66CC66
R:102
G:204
B:102
#99FF99
R:153
G:255
B:153
#66FF66
R:102
G:255
B:102
#339933
R:051
G:153
B:051
#99CC99
R:153
G:204
B:153
#66FF99
R:102
G:255
B:153
#33FF99
R:051
G:255
B:153
#33CC66
R:051
G:204
B:102
#00CC66
R:000
G:204
B:102
#66CC99
R:102
G:204
B:153
#009966
R:000
G:153
B:102
#009933
R:000
G:153
B:051
#33FF66
R:051
G:255
B:102
#00FF66
R:000
G:255
B:102
#CCFFCC
R:204
G:255
B:204
#CCFF99
R:204
G:255
B:153
#99FF66
R:153
G:255
B:102
#99FF33
R:153
G:255
B:051
#00FF33
R:000
G:255
B:051
#33FF33
R:051
G:255
B:051
#00CC33
R:000
G:204
B:051
#33CC33
R:051
G:204
B:051
#66FF33
R:102
G:255
B:051
#00FF00
R:000
G:255
B:000
#66CC33
R:102
G:204
B:051
#006600
R:000
G:102
B:000
#003300
R:000
G:051
B:000
#009900
R:000
G:153
B:000
#33FF00
R:051
G:255
B:000
#66FF00
R:102
G:255
B:000
#99FF00
R:153
G:255
B:000
#66CC00
R:102
G:204
B:000
#00CC00
R:000
G:204
B:000
#33CC00
R:051
G:204
B:000
#339900
R:051
G:153
B:000
#99CC66
R:153
G:204
B:102
#669933
R:102
G:153
B:051
#99CC33
R:153
G:204
B:051
#336600
R:051
G:102
B:000
#669900
R:102
G:153
B:000
#99CC00
R:153
G:204
B:000
#CCFF66
R:204
G:255
B:102
#CCFF33
R:204
G:255
B:051
#CCFF00
R:204
G:255
B:000
#999900
R:153
G:153
B:000
#CCCC00
R:204
G:204
B:000
#CCCC33
R:204
G:204
B:051
#333300
R:051
G:051
B:000
#666600
R:102
G:102
B:000
#999933
R:153
G:153
B:051
#CCCC66
R:204
G:204
B:102
#666633
R:102
G:102
B:051
#999966
R:153
G:153
B:102
#CCCC99
R:204
G:204
B:153
#FFFFCC
R:255
G:255
B:204
#FFFF99
R:255
G:255
B:153
#FFFF66
R:255
G:255
B:102
#FFFF33
R:255
G:255
B:051
#FFFF00
R:255
G:255
B:000
#FFCC00
R:255
G:204
B:000
#FFCC66
R:255
G:204
B:102
#FFCC33
R:255
G:204
B:051
#CC9933
R:204
G:153
B:051
#996600
R:153
G:102
B:000
#CC9900
R:204
G:153
B:000
#FF9900
R:255
G:153
B:000
#CC6600
R:204
G:102
B:000
#993300
R:153
G:051
B:000
#CC6633
R:204
G:102
B:051
#663300
R:102
G:051
B:000
#FF9966
R:255
G:153
B:102
#FF6633
R:255
G:102
B:051
#FF9933
R:255
G:153
B:051
#FF6600
R:255
G:102
B:000
#CC3300
R:204
G:051
B:000
#996633
R:153
G:102
B:051
#330000
R:051
G:000
B:000
#663333
R:102
G:051
B:051
#996666
R:153
G:102
B:102
#CC9999
R:204
G:153
B:153
#993333
R:153
G:051
B:051
#CC6666
R:204
G:102
B:102
#FFCCCC
R:255
G:204
B:204
#FF3333
R:255
G:051
B:051
#CC3333
R:204
G:051
B:051
#FF6666
R:255
G:102
B:102
#660000
R:102
G:000
B:000
#990000
R:153
G:000
B:000
#CC0000
R:204
G:000
B:000
#FF0000
R:255
G:000
B:000
#FF3300
R:255
G:051
B:000
#CC9966
R:204
G:153
B:102
#FFCC99
R:255
G:204
B:153
#FFFFFF
R:255
G:255
B:255
#CCCCCC
R:204
G:204
B:204
#999999
R:153
G:153
B:153
#666666
R:102
G:102
B:102
#333333
R:051
G:051
B:051
#000000
R:000
G:000
B:000

 
visitors since March 26 2007
©2007